---

How to Increment and Decrement Variable in Bash

One of the most common arithmetic operations when writing Bash scripts is incrementing and decrementing variables. This is most often used in loops as a counter, but it can occur elsewhere in the script as well.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis