bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: archive generated by shar -V does not support the -c option]


From: Bob Proulx
Subject: Re: archive generated by shar -V does not support the -c option]
Date: Sat, 28 Aug 2010 16:26:14 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

Karl Berry wrote:
>             test "X$1" = "X-c" && keep_file=false || keep_file=true
> 
> Sounds like a good change in principle, but the precedence of && and ||
> is not portable (or at least it wasn't, NN years ago).  Safer to say:

If I recall correctly the order of "cmd1 && cmd2 || cmd3" is okay.  As
I recall it is the other order "cmd1 || cmd2 && cmd3" that was
problematic.  (I went trolling through the autoconf portability docs
looking for any hints in that area and couldn't find a mention of it.
So perhaps it isn't considered problematic anymore?  In any case this
is the "safe" order, I think.  Are there enough caveats in this
paragraph? :-)

> if test "X$1" = "X-c"; then keep_file=false; else keep_file=true; fi

Of course that would be a safe alternative.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]