Go to the previous, next section.

Redirecting input

To get input for a UNIX command from a file instead of the terminal, enter the command as follows:

command options arguments < inputfile

Replace command, options and arguments with the full command as you would normally enter it. Replace inputfile with the file from which the command is to get its input.

For example, to execute the program myprog and have it draw its input from the file myinput, you'd type the following:

myprog < myinput

Go to the previous, next section.