From: Tom Rini Date: Tue, 4 Feb 2014 17:07:32 -0500 Subject: [U-Boot] [PATCH V4 06/12] cmd_test: implement ! on sub-expressions In-Reply-To: <1391458870-17930-6-git-send-email-swarren@wwwdotorg.org> References: <1391458870-17930-1-git-send-email-swarren@wwwdotorg.org> <1391458870-17930-6-git-send-email-swarren@wwwdotorg.org> Message-ID: <20140204220732.GX7049@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Feb 03, 2014 at 01:21:04PM -0700, Stephen Warren wrote: > From: Stephen Warren > > Currently, ! can only be parsed as the first operator in an expression. > This prevents the following from working: > > $ if test ! ! 1 -eq 1; then echo yes; else echo no; fi > yes > $ if test ! 1 -eq 2 -a ! 3 -eq 4; then echo yes; else echo no; fi > yes > > Fix this by parsing ! like any other operator, and and handling it > similarly to -a and -o. > > Signed-off-by: Stephen Warren Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: