![]() Single-quotes '.': preserves the literal value of each character within the single-quotes, no exceptions.Double-quotes ".": preserves the literal value of all characters within the double-quotes, with the exception of the characters `, $, and \.Backslash \: preserves the literal value of the following character, with the exception of a. ![]() ![]() In POSIX shells, there are 3 quoting mechanisms: Those characters are not interpreted literally by the shell, so that's why when you do echo foo>bar, foo>bar won't be printed to your terminal, but foo will be redirected to the bar file.įortunately, the shell also has a mechanism which makes these characters to lose their special meaning: quoting. For example: | is used in pipelines, > in redirections, \ to escape characters, etc. The shell has characters that have special meaning under some specific conditions. Jesse_b already answered the question, but I think it's worth to address some potential misconceptions.
0 Comments
Leave a Reply. |