Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Shell variables are like variables in any conventional programming language. They hold values until you need them. We described the basics of shell variable names and values in Section 2.5.2. In addition, shell scripts and functions have positional parameters, which is a fancy term for "command-line arguments."
Simple arithmetic operations are common in shell scripts; e.g., adding one to a variable each time around a loop. The POSIX shell provides a notation for inline arithmetic called arithmetic expansion. The shell evaluates arithmetic expressions inside $((...)), and places the result back into the text of the command.