The standard input
|
The standard input is, by default, tied to the keyboard.
A program can read information from it.
But the standard input can be redirected to a file, causing the program to read information from the file as if it is coming from the keyboard. To do that, add <file to the end of a Linux command. For example, jump up <data.txtruns command jump upbut arranges for its standard input to come from file data.txt. |
The standard output
|
The standard output is, by default, tied to the terminal
window, and information written to it shows up in the
terminal.
But the standard output can be redirected to a file, causing the program to write information into the file instead of into the terminal window. To redirect it, write >file after a Linux command. For example, jump up <data.txt >jump-out.txtruns command jump upwith the standard input tied to file data.txt and the standard output going to file jump-out.txt. You can redirect either the standard input or the standard output or both. |