echo $((`cat counter` + 1)) > counter
Which won't work well if there can be multiple instances of the program running at the same time.
In reply to Re^2: best way to keep a simple count?
by adrianh
in thread best way to keep a simple count?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |