X-Combinator

Avatar

making the human scalable

increment the number in a file

Lets say you have a file called REVISION which contains a single number. If you want to increment the number in that file you could run the following command:

Wrap that up as a nice shell script and you get a nice increment command:


[nathan@nate ~]$ cat REVISION
1
[nathan@nate ~]$ increment REVISION
[nathan@nate ~]$ cat REVISION
2

del.icio.us:increment the number in a file digg:increment the number in a file reddit:increment the number in a file

No Comments, Comment or Ping

Reply to “increment the number in a file”