grub-devel
[Top][All Lists]
Advanced

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

Weird bug about wildcard behavior in for statement


From: Z C
Subject: Weird bug about wildcard behavior in for statement
Date: Sat, 31 May 2014 21:55:57 +0800

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]