Tuesday, June 17, 2008

echo

The echo command echoes its arguments. Here are some examples:

   % echo this
this
% echo $EDITOR
/usr/local/bin/emacs
% echo $PRINTER
b129lab1

Things like PRINTER are so-called environment variables. This one stores the name of the default printer --- the one that print jobs will go to unless you take some action to change things. The dollar sign before an environment variable is needed to get the value in the variable. Try the following to verify this:

   % echo PRINTER
PRINTER

No comments: