mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Howto set var from command output
@ 2017-04-19 10:04 张忠山
  2017-04-19 10:14 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: 张忠山 @ 2017-04-19 10:04 UTC (permalink / raw)
  To: barebox

Hush does not support command  substitution
In barebox is there some to set var from a command output?
Or is there a command to do it?


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Howto set var from command output
  2017-04-19 10:04 Howto set var from command output 张忠山
@ 2017-04-19 10:14 ` Sascha Hauer
  2017-04-19 10:25   ` Ian Abbott
  0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2017-04-19 10:14 UTC (permalink / raw)
  To: 张忠山; +Cc: barebox

On Wed, Apr 19, 2017 at 06:04:17PM +0800, 张忠山 wrote:
> Hush does not support command  substitution
> In barebox is there some to set var from a command output?
> Or is there a command to do it?

There is no way to set a variable from a command output, mostly because
this would be really hard to implement. However, some commands support
setting a variable directly, like for example the basename command.
Which command output do you want to have in a variable?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Howto set var from command output
  2017-04-19 10:14 ` Sascha Hauer
@ 2017-04-19 10:25   ` Ian Abbott
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Abbott @ 2017-04-19 10:25 UTC (permalink / raw)
  To: Sascha Hauer, 张忠山; +Cc: barebox

On 19/04/17 11:14, Sascha Hauer wrote:
> On Wed, Apr 19, 2017 at 06:04:17PM +0800, 张忠山 wrote:
>> Hush does not support command  substitution
>> In barebox is there some to set var from a command output?
>> Or is there a command to do it?
>
> There is no way to set a variable from a command output, mostly because
> this would be really hard to implement. However, some commands support
> setting a variable directly, like for example the basename command.
> Which command output do you want to have in a variable?

I guess it would be a nice little project for someone, maybe Google 
Summer of Code if that's still going?  After all, MS-DOS has file 
redirection and primitive pipeline support, so I guess it's doable.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-19 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 10:04 Howto set var from command output 张忠山
2017-04-19 10:14 ` Sascha Hauer
2017-04-19 10:25   ` Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox