Skip to Content
Linux Shell Scripting with Bash
book

Linux Shell Scripting with Bash

by Ken O. Burtch
January 2004
Intermediate to advanced
432 pages
7h 49m
English
Sams
Content preview from Linux Shell Scripting with Bash

Chapter 18. Final Topics

The arcane and the obscure. The obsolete and the advanced. This final chapter contains a mix of subjects suitable for those who need to know every last detail about the Bash shell.

The echo Command

The built-in echo command is an older form of printf. Bash provides it for compatibility with the Bourne shell. echo does not use a format string: It displays all variables as if "%s\n" formatting was used. It can sometimes be used as a shortcut when you don't need the full features of printf.

$ echo "$BASH_VERSION"
2.05a.0(1)-release

A line feed is automatically added after the string is displayed. It can be suppressed with the -n (no new line) switch.

$ echo -n "This is " ; echo "one line."
This is one line

If the -e (escape ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Linux Shell Scripting - Fundamentals of Bash 4.4

Learn Linux Shell Scripting - Fundamentals of Bash 4.4

Sebastiaan Tammer

Publisher Resources

ISBN: 0672326426Purchase book