help-grub
[Top][All Lists]
Advanced

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

Re: Unable to use "case" command on Grub shell; getting syntax errors


From: Manfred Haertel, DB3HM
Subject: Re: Unable to use "case" command on Grub shell; getting syntax errors
Date: Sun, 6 Nov 2022 07:56:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.14

Andrei Borzenkov schrieb:

I'm trying something simple like this:
str1=abcdef; case $str1 in a*f) echo yes ;; esac

But, regardless of how I split the command, I always get this errors:
error: ../../grub-core/script/lexer.c:352:Syntax error
error: ../../grub-core/script/lexer.c:352:Incorrect command

Even just typing "case" and hitting Enter.

Other constructs such as test, if, for, do work normally.

What am I doing wrong? Can someone help please?

grub shell does not implement "case" command.

At least "case" and "esac" are reserved words, according to the grub source code.

However, there is no example which shows us the appropriate syntax.

--
Manfred Härtel, DB3HM    mailto:Manfred.Haertel@rz-online.de
                         http://rz-home.de/mhaertel



reply via email to

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