Skip to Main Content
Unix in a Nutshell, 4th Edition
book

Unix in a Nutshell, 4th Edition

by Arnold Robbins
October 2005
Intermediate to advanced content levelIntermediate to advanced
908 pages
46h 42m
English
O'Reilly Media, Inc.
Content preview from Unix in a Nutshell, 4th Edition

Quoting

Quoting disables a character’s special meaning and allows it to be used literally, as itself. The following table displays characters that have special meaning to the Bash and Korn shells.

Character

Meaning

;

Command separator

&

Background execution

()

Command grouping

|

Pipe

< > &

Redirection symbols

* ? [ ] ~ + - @ !

Filename metacharacters

" ' \

Used in quoting other characters

'

Command substitution

$

Variable substitution (or command or arithmetic substitution)

space tab newline

Word separators

These characters can be used for quoting:

" "

Everything between " and " is taken literally, except for the following characters that keep their special meaning:

$

Variable (or command and arithmetic) substitution will occur.

'

Command substitution will occur.

"

This marks the end of the double quote.

' '

Everything between ' and ' is taken literally except for another '. You cannot embed another ' within such a quoted string.

\

The character following a \ is taken literally. Use within " " to escape ", $, and '. Often used to escape itself, spaces, or newlines.

$" "

Not ksh88. Just like " ", except that locale translation is done.

$' '

Not ksh88. Similar to ' ', but the quoted text is processed for the following escape sequences:

Sequence

Value

Sequence

Value

\a

Alert

\t

Tab

\b

Backspace

\v

Vertical tab

\c X

Control character X

\ nnn

Octal value nnn

\e

Escape

\x nn

Hexadecimal value nn

\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

Learning the Unix Operating System, 5th Edition

Learning the Unix Operating System, 5th Edition

John Strang, Grace Todino, Jerry Peek
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 0596100299Errata Page