Chapter 4: Shell Builtin Commands

52

[Arrays], page 89), one of the names is not a valid shell variable name, an attempt is made to turn off readonly status for a readonly variable, an attempt is made to turn off array status for an array variable, or an attempt is made to display a non-existent function with -f. echo echo [-neE] [arg ...]

Output the args, separated by spaces, terminated with a newline. The return status is 0 unless a write error occurs. If -n is specified, the trailing newline is suppressed. If the -e option is given, interpretation of the following backslash- escaped characters is enabled. The -E option disables the interpretation of these escape characters, even on systems where they are interpreted by default.

The xpg_echo shell option may be used to dynamically determine whether or not echo expands these escape characters by default. echo does not interpret

-- to mean the end of options. echo interprets the following escape sequences:

\a alert (bell)

\b backspace

\c suppress further output

\e

\E escape

\f form feed

\n new line

\r carriage return

\t horizontal tab

\v vertical tab

\\ backslash

\0nnn the eight-bit character whose value is the octal value nnn (zero to three octal 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 hex- adecimal value HHHH (one to four hex digits)

\UHHHHHHHH the Unicode (ISO/IEC 10646) character whose value is the hex- adecimal value HHHHHHHH (one to eight hex digits) enable enable [-a] [-dnps] [-f filename] [name ...]

Enable and disable builtin shell commands. Disabling a builtin allows a disk command which has the same name as a shell builtin to be executed without