Quoting

Quoting is used to prevent the shell from treating characters or words specially. There are three methods of quoting: First, \ quotes the following character, unless it is at the end of a line, in which case both the \ and the newline are stripped. Second, a single quote (‘) quotes everything up to the next single quote (this may span lines). Third, a double quote (“) quotes all characters, except $, ‘ and \, up to the next unquoted double quote. $ and ‘ inside double quotes have their usual meaning (i.e., parameter, command or arithmetic substitution) except no field splitting is carried out on the results of double-quoted substitutions. If a \ inside a double-quoted string is followed by \, $, ‘ or “, it is replaced by the second character; ...

Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The 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.