help-grub
[Top][All Lists]
Advanced

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

Re: Looping through files


From: Jason But
Subject: Re: Looping through files
Date: Wed, 07 Sep 2011 11:03:24 +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

Thanks for the suggestion

I just tried this but it didn't work:
 error: syntax error.
 error: incorrent command.
 error: syntax error

It seems strange that it is not possible to script looping through files on
the boot disk.

As background, what I am trying to achieve is to include menu items
dynamically based on whether certain files exist on the disk. I could do
that with "if [-e ..." as I have done and tested this to work OK. However I
don't want to have to hardcode which files I wish to check for


> 
> Have you tried:
> 
>       while read dir_name
>       do
>               echo $dir_name
>       done < <( ls /boot/* )
> 
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of Jason
> But
> Sent: Tuesday, September 06, 2011 2:50 AM
> To: address@hidden
> Subject: Looping through files
> 
> 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.
> 



reply via email to

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