eg1$ OS=`uname -s`
Wake up. This is cool. BASH also provides process substitution: The output of a command is stored in a temporary file, and that filename is substituted on the command line.
eg2$ comm <(cd /usr/bin; /bin/ls) \ <(cd /usr/local/bin; /bin/ls)