4.3bsd sh problems

Chris Torek chris at mimsy.UUCP
Sun Oct 30 21:14:19 AEST 1988


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.

>2. Problem with test -w:

`test' is not built in to the 4BSD /bin/sh.  /bin/test uses open() to
test files; open for write fails on directories.  SV sh apparently
uses access().  To test directories you have to write your own test
program.

What does POSIX say about each of these?
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list