From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Chargin Date: Tue, 28 Apr 2015 12:13:18 -0700 Subject: [U-Boot] HUSH logical AND/OR expressions In-Reply-To: References: <1430141961.15069.7.camel@transmode.se> <553FCF1B.4010308@gmail.com> Message-ID: <553FDBCE.1000207@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 Dear Joe, On 04/28/2015 11:35 AM, Joe Hershberger wrote: > Hi James, > > On Tue, Apr 28, 2015 at 1:19 PM, James Chargin wrote: >> Dear Joe Hershberger, >> >> On 04/28/2015 11:00 AM, Joe Hershberger wrote: >>> >>> Hi Joakim, >>> >>> On Mon, Apr 27, 2015 at 8:39 AM, Joakim Tjernlund >>> wrote: >>>> >>>> Trying to get a better handle of HUSH shell expressions, this does not >>>> work as I expect: >>>> => false && true || echo ECHO >>>> => false && false || echo ECHO ... > > I always just assumed this was a limitation of hush, but it's now > looking like a bug instead. > > I haven't debugged into it, but I tend to stay away from hush these > days. When I've submitted a bug fix to this area I've been told that > we should upgrade wholesale instead, and I've haven't been up for that > task so far. http://lists.denx.de/pipermail/u-boot/2012-November/139841.html That's a great conversation with Wolfgang, thanks for the reference. Like you, I have tended to use hush carefully. It is similar to sh/bash, but different enough that I never count on an easy port of bash script fragments. 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? > > Perhaps there is an easy, minor bugfix for this that would be palette-able. I've been "afraid" of the hush code for a while. I don't think I want to mess with it now. I'll just continue to work with what we've got, carefully. Thanks again for your attention, Jim