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. Incrementing and Decrementing means adding or subtracting a value (usually 1), respectively, from the value of a numeric variable. In Bash, there are multiple ways to increment/decrement a variable. This article explains some of them.
|
|
Full Story |
This topic does not have any threads posted yet!
You cannot post until you login.