Quoting Rules

In this chapter, you have encountered these special characters:

  • # (comment)

  • > (redirection)

  • | (piping)

In later chapters, you will encounter other special characters and wildcards. Sometimes it is necessary to turn off the special meaning of these characters and let the character just stand for itself. Turning off the special meaning of a character is called quoting, and it can be done with three ways:

  • Using the backslash (\)

  • Using the single quote (')

  • Using the double quote (")

Quoting can be a complex issue, even for experienced UNIX programmers. These next sections give you a series of simple rules to help you understand when quoting is needed and how to do it correctly. Many of these rules are needed by commands in later chapters. ...

Get Practical UNIX now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.