Chapter 5. Quoting
Freud has been credited with the saying, “Sometimes a cigar is just a cigar.” The same concept holds true in shell scripting, “Sometimes an * is just an *.” In the time that I have spent writing and helping others write shell scripts, the single biggest confusion has come from quotes. When do you need to single quote? When do you need to double quote? How do you make a special character, such as an *, just be an *?
This chapter looks at examples of using the escape character and single and double quotes. From there, it moves to cover line continuation. After that, command substitution and parameter expansion are explored. The chapter finishes with arithmetic expansion and arithmetic evaluation.
This chapter teaches you the ...
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.
Read now
Unlock full access