From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Chargin Date: Wed, 29 Apr 2015 08:19:41 -0700 Subject: [U-Boot] HUSH logical AND/OR expressions In-Reply-To: <20150428225112.92E38380153@gemini.denx.de> References: <1430141961.15069.7.camel@transmode.se> <553FCF1B.4010308@gmail.com> <553FDBCE.1000207@gmail.com> <20150428225112.92E38380153@gemini.denx.de> Message-ID: <5540F68D.9010608@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang, Thanks for your contributions. On 04/28/2015 03:51 PM, Wolfgang Denk wrote: > Dear Joe, > > In message you wrote: >> >>> I noticed you asked for a reference to the original hush code that is the >>> origin for U-Boot's adaptation. I couldn't find a reply to that question. I >>> also haven't been able to find anything with a quick we search. Do you know >>> where it did come from? >> >> I never got a response, but it appears to be busybox... > > Oops, sorry. Yes, of course it is busybox. > > As far as I can tell, it was added around October 2001 to the PPCBoot > project as part of the PPCBoot v1.1.0 release: > > * Added "hush" shell (from Busybox) as alternative command line > interpreter, thus enabling powerful command line syntax like > if...then...else...fi conditionals or `&&' and '||' constructs > ("shell scripts"). > > See the README file for information about implementation and usage. > I should have thought of this myself. I could have looked in the commit history or release notes. Just for completeness, I tried the commands using busybox: # busybox|head -1 BusyBox v1.20.2 (2013-07-02 15:49:59 PDT) multi-call binary. # false && true || echo ECHO ECHO # false && false || echo ECHO ECHO # true && false || echo ECHO ECHO # -- Jim Chargin AJA Video Systems jimc at aja.com (530) 271-3334 http://www.aja.com