home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: done Chapter 4
The Bourne Shell and Korn Shell
Next: Reference: esac
 

echo



echo

 [

-n

] [

string

]

Write string to standard output; if -n is specified, the output is not terminated by a newline. If no string is supplied, echo a newline. In the Korn shell, echo is just an alias for print - . (See also echo in Section 2.) echo understands special escape characters, which must be quoted (or escaped with a \) to prevent interpretation by the shell:

\b

Backspace.

\c

Suppress the terminating newline (same as -n ).

\f

Formfeed.

\n

Newline.

\r

Carriage return.

\t

Tab character.

\\

Backslash.

\0 nnn

ASCII character represented by octal number nnn , where nnn is 1, 2, or 3 digits and is preceded by a 0.

Examples

$ 

echo "testing printer" | lp


$ 

echo "Warning: ringing bell \007"


Previous: Reference: done UNIX in a Nutshell: System V Edition Next: Reference: esac
Reference: done Book Index Reference: esac

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System