[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Negation in a condition triggers error message
From: |
Adam Vodopjan |
Subject: |
Negation in a condition triggers error message |
Date: |
Fri, 16 Jun 2023 03:21:21 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 |
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.
- Negation in a condition triggers error message,
Adam Vodopjan <=