./compile >& filename
where the redirection symbols >& direct both the standard output (
stdout
) and write error output to standard error (stderr
) to the file named filename. Sometimes you also want to see the output on the screen at the same time. This is where the Unix command tee comes in. For example the Unix commands./compile |& tee filename
redirects both
stdout
and stderr
to the file filename.
No comments:
Post a Comment