= Command Substitution = Command substitution is a very powerful concept of the UNIX shell. It is used to insert the output of one command into a second command. E.g. with an assignment: {{{ $ today=$(date) # starts the "date" command, captures its output $ echo "$today" Mon Jul 26 13:16:02 MEST 2004 }}} This can also be used with other commands besides assignments: {{{ $ echo "Today is $(date +%A), it's $(date +%H:%M)" Today is Monday, it's 13:21 }}} This calls the {{{date}}} command two times, the first time to print the week-day, the second time for the current time. Of course, this could just be done with: {{{ date "+Today is %A, it's %H:%M" }}} As with all substitutions, the results of a command substitution will undergo WordSplitting, unless the whole thing is inside [[Quotes|double quotes]]. Command substitutions may be nested within each other: {{{ IPs=($(awk /"$(