Clunch protection
Guy Harris
guy at rlgvax.UUCP
Sat Oct 13 14:53:46 AEST 1984
> 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
More information about the Comp.unix
mailing list