Login or register    

Bash Command Substitution

There are two ways:

myvar=`cat /etc/motd`
myvar=$(cat /etc/motd)

Choose either then then try this:

echo $myvar

Comments

Leave a comment

Please login or register to leave a comment!