4.3bsd sh problems

Doug Gwyn gwyn at smoke.BRL.MIL
Mon Oct 31 07:04:08 AEST 1988


In article <14247 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
-In article <67700005 at cdp> hemenway at cdp.UUCP writes:
->	exec 2> /dev/null
->	echo This message goes to /dev/null as it should. 1>&2
->	xxabcxx		# error message should go to /dev/null--it doesn't
->The above script sends sh error messages to /dev/null only when stderr is
->redirected to /dev/null from the command line that called the script.
-As far as I know, this is how things are supposed to work.

No, it should work as Kathy expected.

-What does POSIX say about each of these?

It's not standardized yet.  One hopes that 1003.2 won't canonicalize
the zillions of bugs in older Bourne shells!

My advice to Kathy is (assuming she has an SVR2 or later source
license) to get the BRL Bourne shell and install it (properly
configured, of course) in place of /bin/sh.



More information about the Comp.unix.wizards mailing list