Unix Introduction Part 3 & 4
UNIX Tutorial Three 3.1 Redirection Most processes initiated by UNIX commands write to the standard output (that is, they write to the terminal screen), and many take their input from the standard input (that is, they read it from the keyboard). There is also the standard error, where processes write their error messages, by default, to the terminal screen. We have already seen one use of the cat command to write the contents of a file to the screen. Now type cat without specifying a file to read % cat Then type a few words on the keyboard and press the [ Return ] key. Finally hold the [ Ctrl ] key down and press [ d ] (written as ^D for short) to end the input. What has happened? If you run the cat command without specifying a file to read, it reads the standard input (the keyboard), and on receiving the 'end of file' ( ^D ), copies it to the...