Add one to number in text document
I want a terminal command that will edit a text file by adding 1 to the number in the text.
The entire contents of the text file is just a number.
I'm running the command through appleScr开发者_开发知识库ipt's do shell script command.
Quick and dirty:
do shell script "echo $(( $(<FoO) + 1 )) >FoO"
精彩评论