When shell encounters a single-quote ('), it starts creating a string using these rules:
'
Another single-quote ends the contents and cannot be escapaed (see below rule)
Escape sequences are not expanded (e.g., \t is not translated into a literal TAB)
\t
TAB
Variables are not expanded (e.g., $foo remains $foo)
$foo
Command substitutions are not performed (e.g., $(date) and `date` remain unchanged)
$(date)
`date`
For example:
1 #!/bin/sh 2 echo '$bird $(is) `\t\h\e` ${word}'
Produces:
$bird $(is) `\t\h\e` ${word}
Last updated 6 years ago