mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: guenter.gebhardt@rafi.de
Cc: barebox@lists.infradead.org
Subject: Re: hush command output string
Date: Fri, 14 Dec 2012 09:40:55 +0100	[thread overview]
Message-ID: <20121214084054.GO10369@pengutronix.de> (raw)
In-Reply-To: <OFA6201BB7.A232B0B4-ONC1257AD4.002BB797-C1257AD4.002C0CE1@o0802.rafi.inhouse>

On Fri, Dec 14, 2012 at 09:01:08AM +0100, guenter.gebhardt@rafi.de wrote:
> Hello,
> 
> I want to write a hush script which evaluates standard output of some 
> command, e.g.:
> 
> VARIABLE=$(command)
> 
> or
> 
> VARIABLE=`command`
> 
> How can this be done within hush?

This can't be done. For this we would need output redirection, multiple
thread contexts, ...

In some commands we work around this by specifying the variable name on
the command line.

For example the readline command works like this:

Usage: readline <prompt> VAR
readline reads a line of user input into variable VAR.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2012-12-14  8:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14  8:01 guenter.gebhardt
2012-12-14  8:40 ` Sascha Hauer [this message]

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=20121214084054.GO10369@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=guenter.gebhardt@rafi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox