You can use backticks to store the result of a command (in my example, it's `uname`) on a variable, then `echo` it onscreen, and eventually use it as argument to `mkdir`:
FOO=`uname -n`
echo "$FOO"
mkdir "$FOO"
The excellent Advanced Bash-Scripting Guide has [a whole chapter about Command Substitution][1].
[1]: http://www.tldp.org/LDP/abs/html/commandsub.html