Command substitution

Command substitution

To include the output from one command within the command line for another command, enclose the command whose output is to be included within `backquotes`. For example:

   echo The date today is `date +%d/%m/%y`
   The date today is 17/05/95

The output from the command date +%d/%m/%y is substituted at the appropriate location within a command line that uses the echo command.


[Home] [Search] [Index] This site maintained by unixhelp@math.rutgers.edu
This page was last updated on September 05, 2006 at 10:29 am and is maintained by webmaster@math.rutgers.edu.
For questions regarding courses and/or special permission, please contact mclausen@math.rutgers.edu.
For questions or comments about this site, please contact help@math.rutgers.edu.
© 2012 Rutgers, The State University of New Jersey. All rights reserved.