z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Redirecting error output to a file

z/OS UNIX System Services User's Guide
SA23-2279-00

You can redirect error output from the workstation screen to a file. For example:
(sort -u filea >dev/tty) >& outerr
sorts filea, checking for unique output records. Any messages regarding duplicate records are redirected to a file named outerr.
And if you do not care about seeing the error output, you can just redirect it to /dev/null, also known as the bit bucket. This is equivalent to discarding the error messages.
(sort -u filea >/dev/tty) >& /dev/null

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014