Double Quotes (see Table C.2):

  1. Must be matched.

  2. Protects all metacharacters from interpretation except:

    1. Itself

    2. Exclamation (!) point (bash, csh)

    3. $ used for variable substitutiond.

    4. Backquotes (` ` ) for command substitution

Table C.1. Using Single Quotes and Backslashes
C Shell Bourne ShellKorn ShellTC ShellBash Shell
echo '$><%^&*' echo '$*&!><?' echo '$*&!><?' echo '$><%^&*' echo '$*&!><?'
echo 'I need $5.00\!' echo 'I need $5.00!' echo 'I need $5.00!' echo 'I need $5.00!' echo 'I need $5.00!'
echo 'She cried, "Help"' echo 'She cried, "Help"' echo 'She cried, "Help"' echo 'She cried, "Help"' echo 'She cried, "Help"'
echo '\\\\' \\\\echo '\\\\' \\print '\\\\' \\echo '\\\\' \\echo '\\\\'
Table C.2. Using Double Quotes
C ShellBourne ShellKorn ShellTC Shell ...

Get Linux Shells by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.