[PATCH 1/2] hush: expand variables before globbing in for loops

Sascha Hauer s.hauer at pengutronix.de
Fri Feb 22 03:13:58 EST 2013


On Thu, Feb 21, 2013 at 03:17:13PM +0100, Sascha Hauer wrote:
> The following does work:
> 
> for i in *; do echo $i; done
> 
> but the following does not:
> 
> a="*"; for i in $a; do echo $i; done
> 
> This is because globbing in for loops takes place before the variable
> is expanded. Fix this by explicitly expanding the variables before globbing.
> 
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>

I'll drop this one. While it makes the situation better in some cases,
it does not entirely fix this issue. I think hush is just too buggy to
fix this properly.

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 |



More information about the barebox mailing list