IO Redirection
-
If program runs from terminal: stdin, stdout, stderr connected to terminal.
-
Unix shells allow you to re-direct stdin, stdout and stderr.
-
Run
a.out with stdin coming from file data.txt
-
Run
a.out with stdout going to (overwriting) file output.txt
-
Run
a.out with stdout appended to file output.txt
-
Run
a.out with stderr going to file errors.txt
-
Run
a.out with stdout AND stderr going to file allOut.txt
|