help-grub
[Top][All Lists]
Advanced

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

Looping through files


From: Jason But
Subject: Looping through files
Date: Tue, 06 Sep 2011 17:49:54 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110708 Lightning/1.0b3pre Thunderbird/3.1.10

Hello all

I am trying to make a sort-of complicated grub.cfg file where I want to
search a series of files on the disk.

At first I tried something like

for dir_name in /boot/* ; do
 echo $dir_name
 read
done

But this just printed "/boot/*"

Then I trid

for dir_name in `ls /boot` ; do
 echo $dir_name
 read
done

But this printed "`ls" and then "/boot`"

Obviously what I want to achieve is more than printing information but for
now I want to get the looping code right.

My question is: Is there any way to assign a list of files/directories to a
variable dynamically and/or use it in a loop like this?

Thanks

Jason



reply via email to

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