[comp.unix.shell] sh weirdness

rfinch@caldwr.water.ca.gov (Ralph Finch) (09/01/90)

After rebooting a Sun 4/260, SunOS 4.1, I find that sometimes 'if'
statements are mysteriously mishandled in the Bourne shell.  Doing sh
-x on the scripts reveals that some if's are evaluated and then the
script dies without completing.

This leaves my machine in a fairly crippled state; does anybody have
an idea on how to fix it?  Reboots including cold starts have no
effect.
-- 
Ralph Finch			916-445-0088
rfinch@water.ca.gov		...ucbvax!ucdavis!caldwr!rfinch
Any opinions expressed are my own; they do not represent the DWR

brister@decwrl.dec.com (James Brister) (09/02/90)

On 31 Aug 90 23:22:37 GMT,
rfinch@caldwr.water.ca.gov (Ralph Finch) said:

> After rebooting a Sun 4/260, SunOS 4.1, I find that sometimes 'if'
> statements are mysteriously mishandled in the Bourne shell.  Doing sh
> -x on the scripts reveals that some if's are evaluated and then the
> script dies without completing.

Sounds like a "set -e" has been done somewhere. This causes the shell to
quit if any command (including a test) fails (returns non-zero).

James
--
James Brister                                           brister@decwrl.dec.com
DEC Western Software Lab., Palo Alto, California.         .....!decwrl!brister