scripts

Marc Kleine-Budde mkl at pengutronix.de
Mon Feb 28 11:09:43 EST 2011


On 02/28/2011 05:03 PM, Vanalme Filip wrote:
> I'm currently studying some Barebox scripts (i.e. init, boot) and I have noticed something strange with scripts :
> 
> barebox:/env/bin echo $bootfile
> zImage
> barebox:/env/bin echo $eth0.serverip
> 10.0.48.80
> barebox:/env/bin cat test
> #!/bin/sh
> 
> echo --$eth0.serverip--
> echo --$bootfile--

try:

echo --${bootfile}--

> barebox:/env/bin ./test
> --10.0.48.80--
> ----
> barebox:/env/bin
> 
> When I do an echo of the two environment variables from the command prompt, I can see their values. However, when both commands are entered in a simple script, only the serverip address appears. (I created the test script with "edit" from within Barebox). Am I doing something wrong ?

cheers, Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20110228/be24672e/attachment-0001.sig>


More information about the barebox mailing list