next up previous contents index
Next: Solution: The Pipe Up: The Standard Input and Previous: Output Redirection

Input Redirection

 

Like redirecting standard output , it is also possible to redirect standard input . Instead of a program reading from your keyboard, it will read from a file. Since input redirection is related to output redirection, it seems natural to make the special character for input redirection be <. It too, is used after the command you wish to run.

This is generally useful if you have a data file and a command that expects input from standard input. Most commands also let you specify a file to operate on, so < isn't used as much in day-to-day operations as other techniques.

 



Converted on:
Mon Apr 1 08:59:56 EST 1996