6.2 Shell Quoting Mechanisms
9. Quoting for the Shell: This facility provides varying protection
when the shell attempts to evaluate special characters in your
commandline prior to passing it to the command.
\x makes the next character x ordinary (non-special)
'...' prevents sh interpretation of any characters within the
quotes
"..." prevents sh interpretation of any characters within the
quotes except Shell variable evaluation, Command
substitution, and Backslashes
`...` [back quotes] command substitution: This is a facility for
executing a UNIX command that is between the back
quotes. When done the shell replaces the back quoted
command with the output of that unix command. The
shell then executes the larger unix command.
10. Examples:
$ z='' # or z= or z="" are equivalent; not z=" " though
$ echo $z
$ echo +$z+
++
$ y=*
$ echo $y
$ echo "$y"
$ echo '$y'
$ text='* means all the files in the directory'
$ echo $text
Questions? Robert Katz: rkatz@ned.highline.edu
Last Update July 30, 2002