Name

echo — stdin  stdout  - file  -- opt  --help  --version

Synopsis

echo [options] strings

The echo command simply prints its arguments:

$ echo We are having fun
We are having fun

Unfortunately, there are several different echo commands with slightly different behavior. There’s /bin/echo, but Linux shells typically override this with a built-in command called echo. To find out which you’re using, run the command type echo.

Useful options

-n

Don’t print a final newline character.

-e

Recognize and interpret escape characters. For example, try echo 'helloa' and echo -e 'helloa'. The first prints literally and the second makes a beep.

-E

Don’t interpret escape characters: the opposite of -e.

Available escape characters are:

a

Alert (play a beep)



Backspace

c

Don’t print the final newline (same effect as -n)

f

Form feed

Line feed (newline)

Carriage return

Horizontal tab

v

Vertical tab

\

A backslash

'

Single quote

"

Double quote

nn

The character whose ASCII value is nnn in octal

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.184.90