How to redirect just stderr under the C Shell?

Carl Dichter dichter at chdasic.sps.mot.com
Sat May 11 02:40:29 AEST 1991


RTFFAQ

Paraphrased from the comp.unix.questions FAQ, Item # 16:

(You actually need to run the command in a subshell)

	(command > stdout_file ) 2>& stderr_file

(or let sh do the work for you)

	sh -c 'command > stdout_file 2> stderr_file'

Have Fun.

Carl R. Dichter 
Staff Software Engineer/Scientist
Motorola ASIC Division



More information about the Comp.unix.wizards mailing list