В Tue, 12 Feb 2013 14:57:53 +0100 Ulf Zibis <[email protected]> пишет:
> Am 12.02.2013 03:15, schrieb Andrey Borzenkov: > > В Mon, 11 Feb 2013 20:52:12 +0100 > > Ulf Zibis <[email protected]> пишет: > > > >> Am 11.02.2013 17:46, schrieb Andrey Borzenkov: > >>> For all practical purposes, empty variable is the same as non-existing > >>> variable. > >> Not really, testing for non-existence would fail. > > How do you test for variable existence in grub? > > I'm not clearly sure, but I see different syntax in my grub.cfg, which I > interpret as "test for > existence": > No. Both just test whether result of variable substitution is empty or not. It is empty if variable is not defined or if it is defined but empty. > if [ x"${feature_menuentry_id}" = xy ]; then > ... > > if [ "${prev_saved_entry}" ]; then > set saved_entry="${prev_saved_entry}" > fi > > > -Ulf > _______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
