../_images/space.png

Kansas State University at Salina

Introduction to Unix

../_images/UNIX_blocks.jpeg

echo

echo

display a line of text. echo is often used to display or send an evironment variable to a pipe. (The Pipe (|), sed)

new=$(echo $old | sed 's/oldstring/newstring/')

SYNOPSIS

echo [OPTION]... [STRING]...

OPTIONS

-n

do not output the trailing newline

-e

enable interpretation of the backslash-escaped characters listed below

-E

disable interpretation of those sequences in STRINGs

Escaped Charaters

\NNN the character whose ASCII code is NNN (octal)
\ \ backslash
\a alert (BEL)
\b backspace
\c suppress trailing newline
\f form feed
\n new line
\r carriage return
\t horizontal tab
\v vertical tab

Table Of Contents

Previous topic

A Choice of Shells

Next topic

Shell Metacharacters

This Page