Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!rlgvax!guy
From: guy@rlgvax.UUCP (Guy Harris)
Newsgroups: net.unix
Subject: Re: Clunch protection
Message-ID: <191@rlgvax.UUCP>
Date: Sat, 13-Oct-84 00:53:46 EDT
Article-I.D.: rlgvax.191
Posted: Sat Oct 13 00:53:46 1984
Date-Received: Sun, 14-Oct-84 04:46:22 EDT
References: <> <205@itm.UUCP>
Organization: CCI Office Systems Group, Reston, VA
Lines: 33

> Well,
> 
>     even
>         export PATH || echo "Don't use csh you clunch"
> 
>     doesn't work *every* time.  Our csh gets the "||" and "&&"
> just backwards from sh.  I remember that Guy Harris (rlgvax!guy)
> pointed this out once, too.  So, when I tried it out (just testing,
> of course!) it failed miserably.
> 
>     Most of the time, if I point out a problem I like to include a
> solution, but for this --- any takers?

If you've got the source to your C shell, change the line somewhere
around line 286 in "sh.sem.c" from something like

	if ((getn(value("status")) != 0) != (t->t_dtyp == TAND))

or possibly

	if ((getn(value("status")) == 0) == (t->t_dtyp == TAND))

to

	if ((getn(value("status")) == 0) != (t->t_dtyp == TAND))

which will fix the problem quite nicely.  If you don't have the source,
find out who does and pester them to fix it.  The C shell is supposed to
handle "&&" and "||" the same as the Bourne shell, and the 4.2BSD (and,
I think, 4.1BSD) versions do.  It was a bug in earlier versions.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy