Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!sunybcs!boulder!hao!oddjob!mimsy!umd5!uvaarpa!virginia!mer6g From: mer6g@virginia.acc.virginia.edu (Marc Rouleau) Newsgroups: comp.bugs.sys5 Subject: sh bug Message-ID: <467@virginia.acc.virginia.edu> Date: Mon, 26-Oct-87 10:00:41 EST Article-I.D.: virginia.467 Posted: Mon Oct 26 10:00:41 1987 Date-Received: Thu, 29-Oct-87 23:48:52 EST Reply-To: mer6g@virginia.UUCP (Marc Rouleau) Organization: University of Va., Charlottesville, VA Lines: 25 References: On our 3b2, 3b5, and 3b15 AT&T systems running SYSV.2 and SYSV.3, sh does something rather unfortunate when certain built-in functions fail. For example, cd nowhere || echo 'cd failure' where ``nowhere'' is nonexistent does not (as you might expect) cause ``cd failure'' to be echoed to the screen. The expected error message is produced and then . . . nothing, a new prompt. This became a problem for us when a cron script which checked for the existence of a directory in this (admittedly crude) fashion started breaking. The script chokes and dies whenever the cd fails. It seems to happen with other built-in functions as well; for instance, the ``.'' function does the same thing when the file given it does not exist. Luckily, ``test'' works just fine, so we can run around this problem. BTW, ksh handles all this stuff correctly. Does anyone have a fix? -- Marc Rouleau University of Virginia Academic Computing Center mer6g@virginia.edu mer6g@virginia [bitnet] ...virginia!mer6g