=== modified file 'docs/grub.texi' --- docs/grub.texi 2010-08-01 16:25:09 +0000 +++ docs/grub.texi 2010-08-20 10:38:22 +0000 @@ -1206,8 +1206,10 @@ The backslash retains its special meaning only when followed by one of the following characters: @samp{$}, @samp{"}, @samp{\}, or newline. A backslash-newline pair is treated as a line continuation (that is, it is -removed from the input stream and effectively ignored). A double quote may -be quoted within double quotes by preceding it with a backslash. +removed from the input stream and effectively address@hidden +backslash-newline pair within a variable name is not handled properly, so +use this feature with some care.}.). A double quote may be quoted within +double quotes by preceding it with a backslash. @heading Variable expansion @@ -1219,11 +1221,15 @@ Normal variable names begin with an alphabetic character, followed by zero or more alphanumeric characters. -Positional variable names consist of one or more digits. These are reserved -for future expansion. +Positional variable names consist of one or more digits. They represent +parameters passed to function calls, with @samp{$1} representing first +parameter, and so on. The special variable name @samp{?} expands to the exit status of the most -recently executed command. +recently executed command. When positional variable names are active, other +special variable names @samp{@@}, @samp{*} and @samp{#} are defined and they +expand to all positional parameters with necessary quoting, positional +parameters without any quoting, and positional parameter count respectively. @heading Comments @@ -1284,6 +1290,35 @@ @xref{menuentry}. @end table address@hidden Built-in Commands + +Some built-in commands are also provided by GRUB script to help script +writers perform actions that are otherwise not possible. For example, these +include commands to jump out of the loop statements without fully completing +them, etc. + address@hidden @asis address@hidden break [n] +When this command is executed from loops, it jumps out of the @code{for}, address@hidden, and @code{until} loops without executing any following +commands in the loop body. Optional integer argument @code{n} specifies the +number of enclosing loops to jump out off, and it defaults to one. + address@hidden continue [n] +When this command is executed from loops, it skips the rest of commands in +the loop body and proceeds with next iteration from the beginning. For address@hidden and @code{until} loops, execution starts with their condition. +Optional integer argument @code{n} specifies the number of enclosing loops +to jump out off, and it defaults to one. + address@hidden shift [n] +When this command is executed with in a function, it adjusts its positional +variables by one, by replacing first variable value with second variables +value, and so on. Last positional variable looses its value and values for +special variables @samp{$@@}, @samp{$*} and @samp{$#} are adjusted +accordingly. Optional integer argument @code{n} specifies number of times +to perform shifting, and it defaults to one. address@hidden table @node Embedded configuration @section Embedding a configuration file into GRUB