Command Substitution: This is a shell technique for grabbing the output of one command and using it in another command. Suppose this command produces the date stamp we are after: /bin/date -R|tr -d ','|awk '{print $1,$2,$3}' and we want to put that datestamp string into another variable. Start out with this structure: $( ) and $( ) just $( ) sneak $( ) up $( ) quietly $( ) on $( ) the $( ) command $( ) and $( ) enclose $( ) it $( ) with $( ) the $( ) brackets $(/bin/date -R|tr -d ','|awk '{print $1,$2,$3}') voila! day=$(/bin/date -R|tr -d ','|awk '{print $1,$2,$3}' )