Chapter 3: Basic Shell Features

7

\f form feed

\n newline

\r carriage return

\t horizontal tab

\v vertical tab

\\ backslash

\’ single quote

\" double quote

\nnn the eight-bit character whose value is the octal value nnn (one to three digits)

\xHH the eight-bit character whose value is the hexadecimal value HH (one or two hex digits)

\uHHHH the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value

HHHH (one to four hex digits)

\UHHHHHHHH the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value

HHHHHHHH (one to eight hex digits)

\cx a control-x character

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

3.1.2.5 Locale-Specific Translation

A double-quoted string preceded by a dollar sign (‘$’) will cause the string to be translated according to the current locale. If the current locale is C or POSIX, the dollar sign is ignored.

If the string is translated and replaced, the replacement is double-quoted.

Some systems use the message catalog selected by the LC_MESSAGES shell variable. Others create the name of the message catalog from the value of the TEXTDOMAIN shell variable, possibly adding a suffix of ‘.mo’. If you use the TEXTDOMAIN variable, you may need to set the TEXTDOMAINDIR variable to the location of the message catalog files. Still others use both variables in this fashion: TEXTDOMAINDIR/LC_MESSAGES/LC MESSAGES/TEXTDOMAIN.mo.

3.1.3 Comments

In a non-interactive shell, or an interactive shell in which the interactive_comments option to the shopt builtin is enabled (see Section 4.3.2 [The Shopt Builtin], page 62), a word beginning with ‘#’ causes that word and all remaining characters on that line to be ignored.

An interactive shell without the interactive_comments option enabled does not allow comments. The interactive_comments option is on by default in interactive shells. See

Section 6.3 [Interactive Shells], page 83, for a description of what makes a shell interactive.