Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!lll-winken!lll-tis!ames!ncar!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: 4.3bsd sh problems Message-ID: <14247@mimsy.UUCP> Date: 30 Oct 88 11:14:19 GMT Article-I.D.: mimsy.14247 References: <67700005@cdp> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 20 In article <67700005@cdp> hemenway@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@mimsy.umd.edu Path: uunet!mimsy!chris