June 2017
Beginner
502 pages
11h 26m
English
Single quotes enable a strong quoting so that none of the metacharacters we saw before, such as $, ", ', and \ , are interpreted; and everything quoted this way is taken literally except for the single quote itself, which keeps its function of the metacharacter. This means that you cannot use it at all since the usual way of taking the literal value of a character. Using a backslash does not work since inside the single quote, as the backslash itself loses its meta effect. One notable effect of strong quoting is that you cannot reference the value of a variable any longer:
zarrelli:~$ x=10 ; echo '$x'$x
That being said, we still have some characters with special meanings even after being escaped; here are some of them:
Read now
Unlock full access