Functions allow local variables and recursion, and have access to the environment of the calling shell. Aliases may be used to create a mnemonic for a command name, expand a single word to a complex command, or ensure that a command is called with a basic set of options. Arrays Bash-2.0 supports indexed arrays of unlimited size. The subscript for an array is an arithmetic expression. Arrays may be assigned to with a new compound assignment syntax, and several builtins have options to operate on array variables.
Bash includes a number of built-in array variables.
Arithmetic Bash allows users to perform integer arithmetic in any base from two to sixty-four. Nearly all of the C language arithmetic operators are available with the same syntax and precedence as in C. Arithmetic expansion allows an arithmetic expression to be evaluated and the result substituted into the command line. Shell variables can be used as operands, and the value of an expression may be assigned to a variable. There is a new quoting syntax that allows backslash-escaped characters in strings to be expanded according to the ANSI C standard. Tilde Expansion Users' home directories may be expanded using this feature.