Sunday, February 1, 2009

values from linux commands

If you place a Linux command within back quotes (`) on the command line, that command is first executed and its result becomes an argument on the command line

Ex:
$ listc=`ls *.pl`
$ echo $listc


Keep in mind the difference between single quotes and back quotes. Single quotes treat a Linux command as a set of characters. Back quotes force execution of the Linux command.

No comments:

Post a Comment