help-grub
[Top][All Lists]
Advanced

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

Re: Negation in a condition triggers error message


From: Andrei Borzenkov
Subject: Re: Negation in a condition triggers error message
Date: Fri, 16 Jun 2023 09:11:31 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 16.06.2023 03:21, Adam Vodopjan wrote:
I'm on grub 2.06 in ubuntu 22.04


grub> [ a -gt 9 ]; echo $?

1
grub> [ ! a -gt 9 ]; echo $?
error: unrecognized number.
0

grub> [ a -lt 9 ]; echo $?
error: unrecognized number.
0
grub> [ ! a -lt 9 ]; echo $?
1

grub> [ a -eq 9 ]; echo $?
1
grub> [ ! a -eq 9 ]; echo $?
error: unrecognized number.
0


Why does it show/hide the error depending on the negation? Evidently, the error
should be shown each time, one of the args is not a number in each example.



There is no special code and in all cases grub should have called strtoull ("a", ...). You may want to debug why it happens.



reply via email to

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