Sunday, May 29, 2011

HowTo: Use Bash Parameter Substitution Like A Pro

The $ character is used for parameter expansion, and command substitution. You can use it for manipulating and/or expanding variables on demands without using external commands such as sed or awk.

#1: Getting Up Default Shell Variables Value

The syntax is as follows:

${parameter:-defaultValue}var

View the Original article