How do I print a single line output in Unix?
Answer
You can
insert $(command) (new style) or `command` (old style) to insert the output of a command into a double-quoted string. echo “Welcome $(whoami)!” Note: In a script this will work fine. If you try it at an interactive command line the final !
Answer
You can
insert $(command) (new style) or `command` (old style) to insert the output of a command into a double-quoted string. echo “Welcome $(whoami)!” Note: In a script this will work fine. If you try it at an interactive command line the final !