Bash Reference Manual. Node: ANSI-C Quoting

PREVDouble Quotes UPQuoting NEXTLocale Translation

3.1.2.4: ANSI-C Quoting

Words of the form $'string' are treated specially. The word expands to string, with backslash-escaped characters replaced as specifed by the ANSI C standard. Backslash escape sequences, if present, are decoded as follows:

\a

alert (bell)

\b backspace
\e an escape character (not ANSI C)
\f form feed
\n newline
\r carriage return
\t horizontal tab
\v vertical tab
\\ backslash
\nnn the character whose ASCII code is the octal value nnn (one to three digits)
\xnnn the character whose ASCII code is the hexadecimal value nnn (one to three digits)

The result is single-quoted, as if the dollar sign had not been present.

PREVDouble Quotes UPQuoting NEXTLocale Translation