[Top][All Lists]

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

Re: logical XOR

From: Robert Millan [ackstorm]
Subject: Re: logical XOR
Date: Fri, 29 Jun 2007 12:08:22 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Fri, Jun 29, 2007 at 10:16:18AM +0100, Stephane Chazelas wrote:
> Do you mean that for instance, you'd like a third command to be
> executed if either but not both of two commands succeed?
> cmd1; a=$?
> cmd2; b=$?
> (( !a != !b )) && cmd3
> should do.

Thank you, that works.  Although I think ^^ would be more intuitive.  Let me
know if you want a patch for that.

Robert Millan

reply via email to

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