[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Square bracket test expressions in GRUB2's scripting language undocument
From: |
João Ricardo Sares Teles de Matos |
Subject: |
Square bracket test expressions in GRUB2's scripting language undocumented. |
Date: |
Wed, 19 Jun 2013 12:34:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 |
Usage of the square brackets to evaluate conditional expressions, for example:
if [ -s $prefix/grubenv ]; then
load_env
fi
Is seen being used in typical GRUB 2 configurations shipped with popular
GNU/Linux distros, but I couldn't find any documentation on the subject.
The only related thing I could find was in the node 'Shell-like scripting'
(5.2) of the manual, where the strings "[[" and "]]" are declared as reserved
words, like in bash. But no mention of just "[" at all.
Can the documentation for the "test" command from GNU Coreutils be used safely
for GRUB 2's "[" command?
Is this feature documented anywhere at all, outside the source?
Thank you,
João Ricardo Matos
signature.asc
Description: OpenPGP digital signature
- Square bracket test expressions in GRUB2's scripting language undocumented.,
João Ricardo Sares Teles de Matos <=