Print text to console

Synopsis

  echo [-n] [...]

Examples

Print "hello world"

  echo hello world

Print the boot filename

  echo ${filename}

Print the MAC address of interface "net0"

  echo MAC address is ${net0/mac}

Ask the user to supply a filename

  echo -n Enter boot filename:
  read filename
  echo Booting from ${filename}

Description

Print text to the console. As with all iPXE commands, any settings such as ${filename} will be expanded. This allows echo to be used to display the value of iPXE settings. For example, to display the boot filename obtained via DHCP:

  iPXE> dhcp
  DHCP (net0 52:54:00:12:34:56)... ok
  iPXE> echo ${filename}
  http://boot.ipxe.org/demo/boot.php

If the -n option is specified, then the trailing newline will not be printed.

See also

 
cmd/echo.txt · Last modified: 2011/03/27 11:53 by mcb30
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL http://ipxe.org
References to "iPXE" may not be altered or removed.