Re: Shell loop bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 17, 2015 at 01:24:11PM +0300, Alexander Shiyan wrote:
> Hello.
> 
> barebox@/ # for i in /dev/* ; do echo $i; done
> /dev/flash0
> /dev/full
> /dev/m25p0
> /dev/m25p1
> /dev/mem
> /dev/null
> /dev/ram0
> /dev/self0
> /dev/serial1
> /dev/zero
> 
> barebox@/ # for i in /dev/*1 ; do echo $i; done
> /dev/m25p1
> /dev/serial1
> 
> barebox@/ # for i in /dev/*2 ; do echo $i; done
> /dev/*2
>      ^^^^^^^^ Is this correct?

When there is no /dev/*2, then yes, this is correct.

Try the same under bash, it behaves the same. If there's nothing
matching the wildcard pattern then the wildcards are just passed
through.

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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux