|Department of Engineering|
|University of Cambridge > Engineering Department > computing help|
date > out
and the output goes into the file called out. You can check this using the command more out which will write the contents of out onto the screen. who is a command which prints out who is logged on to the workstations near to you.
who >> out
(note the double '
>' signs) will append the output of
who to the file out. Check
this again using more (more will display the
first page of the file; to see successive pages press the
You can also redirect output into another process's input. This is
done using the `|' character (found above the <Return> key).
date | wc
and the output from date will be `piped' straight into a program that counts the number of lines, words and characters in its input. Another pipe example is
cat text | ispell -h
which would send the contents of text not to the screen, but through a spell checker. The spelling checker will then print out those words in the file text which are not in the online dictionary.
|| computing help ||