Log in Go to the main page Page Discussion History Go to the file list Go to the site toolbox Bookmark and Share

Echo command

From RZWiki


Image:linux-logo-large.png

A command shell built-in function available on most Linux platforms; used to display a line of text on the terminal (or command line.)

Contents

Image:Vm-power-on-medium.png Usage Syntax

echo [options] text

Common options include;

  • -n - do not output the trailing new line

Image:Vm-power-on-medium.png Usage Examples

echo hello world

echo $HOME

echo -n $HOME

Image:utilities-terminal-medium-v2.png Typical Output

noinclude/noinclude

steve@test-laptop:~$ echo hello world
hello world
steve@test-laptop:~$ echo $HOME
/home/steve
steve@test-laptop:~$ echo -n $HOME
/home/stevesteve@test-laptop:~$

Image:accessories-text-editor-v2-medium.png Usage Notes

As shown above, the environment variables can be specified instead of actual text

Text containing spaces does not need to be enclosed in quotes: '

Special characters must be 'masked' with \

Image:accessories-text-editor-v2-medium.png Linux Usage Notes

With most Linux or Unix commands;

  • Non root users may need to prefix commands with the sudo command, for example: sudo chmod 644 *
  • Brief help can be displayed using the -h or --help parameter, for example: chmod --help
  • A full command manual can be displayed using the man command followed by the command name, for example: man chmod
  • Sometimes 'info' pages are used instead of or to provide more information than man pages; for example: info chmod
  • Version information can normally be display using the -v, -V or --version parameter, for example: chmod --version. However, this paramater is also frequently used to display verbose output.

noinclude/noinclude

Image:Folder-medium.png Related Files

The echo executable is normally found here: /bin/echo

Image:icemon-medium.png Related Articles

Information on other Linux shell commands Image:Tux-small.png

Information on other Linux commands Image:Tux-small.png

Information on F5 BigIP commands Image:F5-logo-small.png

Information on Cisco commands Image:Cisco-logo-small.png

Information on Vyatta commands Image:Vyatta-logo-small.png

Information on Extreme commands Image:Extreme-logo-small.png

Information on Blue Coat SGOS commands

Information on Nokia IPSO commands

Image:internet-group-chat-small.png We really do appreciate all feedback so please do send your comments, suggestions or corrections to sjiveson#routerzone.eu
(replacing the # with an @)


Site Toolbox:

Personal tools
This page was last modified on 18 June 2009, at 09:50. - This page has been accessed 25 times. - Disclaimers - About RZWiki
Powered by MediaWiki