Suse & OpenSuse : Tips, Tricks, Tutorials, How Tos and Troubleshooting

Using command output with backquotes

The backquote (`), which is quite alien to most Windows users, is the key just below the top left hand side ESC key on your keyboard.  This is a useful key to use when you want to use the standard output of a UNIX/LINUX command as part of another command.

DSC00380-1

For example, if you want to output the results of an addition.

# expr 10 + 42
# 52

If you would like to make it fancier,

# echo “The sum is `expr 10 + 42`
The sum is 52

Note the backquotes (in red).

RSS feed | Trackback URI

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.