help-grub
[Top][All Lists]
Advanced

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

Re: Square bracket test expressions in GRUB2's scripting language undocu


From: Andrey Borzenkov
Subject: Re: Square bracket test expressions in GRUB2's scripting language undocumented.
Date: Thu, 20 Jun 2013 06:11:09 +0400

В Wed, 19 Jun 2013 12:34:55 +0100
João Ricardo Sares Teles de Matos <address@hidden> пишет:

> 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.
> 

Thank you for the pointer, I'll check it.

> Can the documentation for the "test" command from GNU Coreutils be used 
> safely for GRUB 2's "[" command?
> 

It is not exactly the same, there are a couple of idfferences.

> Is this feature documented anywhere at all, outside the source?
> 

It is documented in current development version.

Attachment: signature.asc
Description: PGP signature


reply via email to

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