Of course in Vim you have <C-a> to increment a number.Is this POSIX specified?How can I increment (or decrement) a number portably, such as in a scripted edit with ex?Even if the answer is just Use an external filter, what would be the best POSIX-specified tool for this job?Example specific requirement:Increment the number found in the final field of line 1 by 1.Decrement the number found in the final field of line 2 by 1.Example input:Here is    a    number: 5Here is another number: 2Example output:Here is    a    number: 6Here is another number: 1
Increment a number using POSIX features only?
ex mode;posix