All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Add setexpr command
Date: Thu, 14 Feb 2008 07:41:37 -0500	[thread overview]
Message-ID: <47B43701.1070102@ge.com> (raw)
In-Reply-To: <ECA572BB-0720-4BD4-9A91-AEBC1056DCA4@kernel.crashing.org>

Kumar Gala wrote:
> On Feb 13, 2008, at 5:07 PM, Wolfgang Denk wrote:
> 
>> In message <Pine.LNX. 
>> 4.64.0802131648030.23661 at blarg.am.freescale.net> you wrote:
>>> Add a simple expr style command that will set an env variable as  
>>> the result
>>> of the command.  This allows us to do simple math in shell.  The  
>>> following
>>> operations are supported: &, |, ^, +, -, *, /.
>>>
>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>> ---
>>>
>>> this was the expr patch, but renamed based on comments on the list.
>> <grumble>
>> Well, *my* command was *not* to rename it.
> 
> sorry, saw your post after I sent this :)
>> </grumble>
>>
>> At least, please don't make it a default command, then.
> 
> If you are good with calling it expr so am I.  I'd prefer not  
> confusing 'setenv' with 'setexpr'.  If we call it expr add it to the  
> default list?
> 
> - k

OK, time to educate Jerry since I'm too lazy to check myself.  Does our 
hush shell support back ticks?  If we have back tick support, or can add 
that support, we should call it expr and return a value which then gets 
placed properly.  That would be IDEAL.
   setenv foo `expr 2 + 3`

gvb

  parent reply	other threads:[~2008-02-14 12:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-13 22:53 [U-Boot-Users] [PATCH] Add setexpr command Kumar Gala
2008-02-13 23:07 ` Wolfgang Denk
2008-02-13 23:42   ` Kumar Gala
2008-02-14  0:35     ` Wolfgang Denk
2008-02-14 12:41     ` Jerry Van Baren [this message]
2008-02-14 14:35       ` Kumar Gala
2008-02-14 19:05       ` Wolfgang Denk
2008-02-14  9:14 ` Matthias Fuchs
2008-02-14 14:36   ` Kumar Gala
2008-02-14 19:02   ` Wolfgang Denk
2008-03-25 21:14 ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B43701.1070102@ge.com \
    --to=gerald.vanbaren@ge.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.