grub-devel
[Top][All Lists]
Advanced

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

Re: How to use grub regex?


From: Mat Troi
Subject: Re: How to use grub regex?
Date: Wed, 21 Sep 2016 13:47:47 -0700

Hi,

No, I just want to find a word in a string.  I got it to work now.  Thanks for your feedback.

grub>  set foo=(hd0,gpt1)
grub> echo $foo
(hd0,gpt1)

grub> regexp -s word '^(.*),.*' $foo     
grub> echo $word
(hd0



grub> regexp -s word '^.*(pt).*' $foo    
grub> echo $word
pt


Thanks,
MT





On Friday, September 16, 2016, Bruno Doutriaux - ABCD Informatique <address@hidden> wrote:
Hello,

what kind of behaviour do you search for in grub ? changing of directory or what ?

Cordialement,
-----------------------------
Bruno DOUTRIAUX
03 27 40 22 66
06 58 60 39 53


2016-09-17 0:53 GMT+02:00 Mat Troi <address@hidden>:
Hi,

I want to find out if a string contain certain word in grub.  I am thinking about using grub regex.

Problem:
set string = (hd0,gpt1)/blah/blah
I want to find if cd is in string, how do I do that?


I tried "regex --set=foo 'cd' $string
echo $foo

There isn't anything in foo, so I guess my regex is not correct.

Thanks,
MT

_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel



reply via email to

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