O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Redirecting Standard Error

All three major shells use a greater than symbol (>) to redirect standard output. However, the Bourne Again and Z Shells' syntax to combine and redirect standard output and standard error (page 552) differs from that in the TC Shell, which uses a greater than symbol followed by an ampersand (>&). The following examples, like the bash example (page 552), reference the file x, which does not exist, and the file y, which contains a single line:

tcsh $ cat x 
cat: x: No such file or directory
tcsh $ cat y
This is y.
tcsh $ cat x y >& hold
tcsh $ cat hold
cat: x: No such file or directory
This is y.

Unlike both bash and zsh, tcsh does not provide a simple way to redirect standard error separately from standard output. A ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required