grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* Weird bug about wildcard behavior in for statement
@ 2014-05-31 13:55 Z C
  2014-06-01  0:22 ` Tobias Geerinckx
  0 siblings, 1 reply; 2+ messages in thread
From: Z C @ 2014-05-31 13:55 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

I am currently using grub version 2.02 beta 2 got from git

In the grub command shell, if the first command I execute is

* for i in /*; do echo $i; done*

What I expect is the file/directory list of my $root partition. But the
result is just /* itself

Then if I execute the second command

*for i in /*; do echo $i; regexp '' $i; done*

I got the same result: /*

And if I execute the second command again, the result varies and I got the
file list as what I expected at the beginning.

Then if I execute the first command again, the result is still the file
list.

This test really shocked me, because the same command may produce different
result randomly. I really wonder what is the intended behavior of *
character in for statement

[-- Attachment #2: Type: text/html, Size: 1140 bytes --]

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

end of thread, other threads:[~2014-06-01  0:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-31 13:55 Weird bug about wildcard behavior in for statement Z C
2014-06-01  0:22 ` Tobias Geerinckx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).