<tt>></tt>, <tt>>></tt>: Standard Output



next up previous contents
Next: 2;;;;&: Standard Up: Input/Output Redirection Previous: ;;: Input Redirection

>, >>: Standard Output

Just as < is used as the standard input, > is used as the standard output redirection.

cat file
usually displays the results on the terminal screen.

By concatenating > outfile to the command, as in

cat file > outfile
the output will be redirected to outfile. If outfile did not exist, it is created. If it does exist, the previous contents are lost, and replaced with the new output!!

This problem can be avoided by using >>:

cat file >> outfile
where file will be appended to outfile.



Super-User
Fri Feb 17 15:55:40 EST 1995