LXer: How to Increment and Decrement Variable in Bash
Published at LXer:
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. Read More... |
All times are GMT -5. The time now is 03:46 PM. |