You can use $(command) or command
and set a variable to the output of the command in Linux Bash Shell
1 2 3 4 5 |
name=$(echo $USER) echo $name ## Returns your username name=`echo $USER` echo $name ## Returns your username |