Redirecting standard input

Redirecting standard input

To redirect the standard input for a command use the < (less than) character followed by the name of the input file. For example:

   mail tony < memo

This redirects the standard input to the mail command so that it comes from the file memo. The effect of this is to mail the contents of this file to the user tony.


[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.