* Shell loop bug?
@ 2015-11-17 10:24 Alexander Shiyan
2015-11-17 10:41 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2015-11-17 10:24 UTC (permalink / raw)
To: barebox
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?
Thanks.
---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Shell loop bug?
2015-11-17 10:24 Shell loop bug? Alexander Shiyan
@ 2015-11-17 10:41 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-11-17 10:41 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-17 10:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-17 10:24 Shell loop bug? Alexander Shiyan
2015-11-17 10:41 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox