Menu

IncRev Log in to Edit

Dr. Schorsch

IncRev is a small command line tool written in Ansi-C that can automatically increment (or decrement) a number in a text file. The location of the number has to be specified by a string pattern. IncRev checks that there is enough blank space in front of the number to update it and does the change in place.

Syntax

IncRev is called with the following syntax:

IncRev <filename> <string pattern> [<increment>]

<filename>: is the name of the text file to be updated.
<string pattern>: is the string just in front of the number that defines its location in the text file.
<increment>: is an optional increment to apply. Default value is 1. Increment can be negative!

Motivation

I provided this tool since this is an everyday task that could be handled by some nice perl/bash/$SCRIPTLANGUAGE scripts. But these language are not available on all platforms. But a simple ansi-c program can be compiled nearly everywhere.

In this project IncRev it is used to automatically update the build number stored in the file Version.in.

[Category:build_tool]


Related

Wiki: How_to_Build_X3P_Library

Discussion

Anonymous
Anonymous

Add attachments
Cancel