title: How to Increment and Decrement Variable in Bash (Counter) date: 2019-11-01 13:12:45 categories: [programming] tags: [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.