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.
As @KalvinLee commented, the preferred format is now $(...):
FOO=$(uname -n)