The Redirection Command

The redirection command



What does it do ?

The redirection command allows you to redirect input to a file or retrieve output from a file.


How is it used ?

(>,<) filename


Examples and remarks

To store the output from running the program a.out into a file, use the command a.out > a1.out. This permits you to store your output into a file named a1.out. To read data from a file named a1.input, use the command a.out < a1.input. Caution: The shell may overwrite contents within a file if that file already exists.



next previous table of contents