All of lore.kernel.org
 help / color / mirror / Atom feed
* How to use grub regex?
@ 2016-09-16 22:53 Mat Troi
  2016-09-17  5:47 ` Andrei Borzenkov
  2016-09-17  6:42 ` Bruno Doutriaux - ABCD Informatique
  0 siblings, 2 replies; 4+ messages in thread
From: Mat Troi @ 2016-09-16 22:53 UTC (permalink / raw)
  To: The development of GNU GRUB

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

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

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

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

* Re: How to use grub regex?
  2016-09-16 22:53 How to use grub regex? Mat Troi
@ 2016-09-17  5:47 ` Andrei Borzenkov
  2016-09-17  6:42 ` Bruno Doutriaux - ABCD Informatique
  1 sibling, 0 replies; 4+ messages in thread
From: Andrei Borzenkov @ 2016-09-17  5:47 UTC (permalink / raw)
  To: The development of GNU GRUB

17.09.2016 01:53, Mat Troi пишет:
> 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.
> 

You search for 'cd' and there is no occurrence of 'cd' in string; why do
you expect anything to be returned?


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

* Re: How to use grub regex?
  2016-09-16 22:53 How to use grub regex? Mat Troi
  2016-09-17  5:47 ` Andrei Borzenkov
@ 2016-09-17  6:42 ` Bruno Doutriaux - ABCD Informatique
  2016-09-21 20:47   ` Mat Troi
  1 sibling, 1 reply; 4+ messages in thread
From: Bruno Doutriaux - ABCD Informatique @ 2016-09-17  6:42 UTC (permalink / raw)
  To: The development of GNU GRUB

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

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

<http://depannages-informatique.herobo.com>

2016-09-17 0:53 GMT+02:00 Mat Troi <mattroisang@gmail.com>:

> 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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>

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

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

* Re: How to use grub regex?
  2016-09-17  6:42 ` Bruno Doutriaux - ABCD Informatique
@ 2016-09-21 20:47   ` Mat Troi
  0 siblings, 0 replies; 4+ messages in thread
From: Mat Troi @ 2016-09-21 20:47 UTC (permalink / raw)
  To: The development of GNU GRUB

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

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 <
bruno.doutriaux@gmail.com> 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
>
> <http://depannages-informatique.herobo.com>
>
> 2016-09-17 0:53 GMT+02:00 Mat Troi <mattroisang@gmail.com
> <javascript:_e(%7B%7D,'cvml','mattroisang@gmail.com');>>:
>
>> 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
>> Grub-devel@gnu.org <javascript:_e(%7B%7D,'cvml','Grub-devel@gnu.org');>
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>

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

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

end of thread, other threads:[~2016-09-21 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 22:53 How to use grub regex? Mat Troi
2016-09-17  5:47 ` Andrei Borzenkov
2016-09-17  6:42 ` Bruno Doutriaux - ABCD Informatique
2016-09-21 20:47   ` Mat Troi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.