From cb8a2c382e70d3b6924120c86e944297cd8d0dce Mon Sep 17 00:00:00 2001 From: cjwatson Date: Fri, 25 Sep 2009 23:43:46 +0000 Subject: [PATCH] 2009-09-26 Colin Watson * docs/grub.texi (Command-line and menu entry commands): Document date and echo commands. --- ChangeLog | 5 +++++ docs/grub.texi | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/ChangeLog b/ChangeLog index fd9865440..fdca53d01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-26 Colin Watson + + * docs/grub.texi (Command-line and menu entry commands): Document + date and echo commands. + 2009-09-24 Pavel Roskin * include/grub/kernel.h (struct grub_module_header): Remove diff --git a/docs/grub.texi b/docs/grub.texi index 06059df4d..4fa44462e 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -1118,6 +1118,8 @@ you forget a command, you can run the command @command{help} * cmp:: Compare two files * configfile:: Load a configuration file * crc:: Calculate CRC32 checksums +* date:: Display or set current date and time +* echo:: Display a line of text * export:: Export an environment variable * halt:: Shut down your computer * help:: Show help messages @@ -1234,6 +1236,62 @@ Display the CRC32 checksum of @var{file}. @end deffn +@node date +@subsection date + +@deffn Command date [[year-]month-day] [hour:minute[:second]] +With no arguments, print the current date and time. + +Otherwise, take the current date and time, change any elements specified as +arguments, and set the result as the new date and time. For example, `date +01-01' will set the current month and day to January 1, but leave the year, +hour, minute, and second unchanged. +@end deffn + + +@node echo +@subsection echo + +@deffn Command echo [@option{-n}] [@option{-e}] string @dots{} +Display the requested text and, unless the @option{-n} option is used, a +trailing new line. If there is more than one string, they are separated by +spaces in the output. As usual in GRUB commands, variables may be +substituted using @samp{$@{var@}}. + +The @option{-e} option enables interpretation of backslash escapes. The +following sequences are recognised: + +@table @code +@item \\ +backslash + +@item \a +alert (BEL) + +@item \c +suppress trailing new line + +@item \f +form feed + +@item \n +new line + +@item \r +carriage return + +@item \t +horizontal tab + +@item \v +vertical tab +@end table + +When interpreting backslash escapes, backslash followed by any other +character will print that character. +@end deffn + + @node export @subsection export