There is a special set of commands, called escape commands or escapes, that perform functions while you are in the process of writing a message.
You use an escape command by entering it on a line
by itself, with a tilde ( ~
) as the very
first character.
The tilde is called an escape character because it signals
mailx
to escape from the current editing environment to perform
the command that follows.
You may change the escape character by setting
the
escape
mail variable.
If
you want to type a real tilde as the very first character on a line in your
message, you must type two tildes.
Table E-1
describes the escape commands.
Table E-1: Escape Commands in mailx
Command | Description |
|
Enters the tilde ( ~) character in the body of the mail message. |
|
Executes the shell
|
|
Prints a brief summary of escape commands. |
|
Executes the specified mail command. This is useful for performing housekeeping tasks such as redisplaying a message. For example, entering
|
|
Inserts the string set in
|
|
Inserts the string set in
|
|
Inserts the specified names
in
|
|
Adds the specified names
to the
|
|
Dumps core. |
|
Includes the file named
|
|
Invokes the editor specified
by the
|
|
Reads the current message or the specified messages into your message. |
|
Similar to
|
|
Edits the message header fields. This command displays the fields one at a time so you can alter them by adding text to the end, by using the Delete key, or by pressing Ctrl/U to erase the entire field and then retyping it. Use this command with caution. |
|
Inserts the value of the named variable into the mail message. For example: the command
|
|
Includes the current message
or the specified messages, shifted one tab stop to the right.
If the
|
|
Similar to
|
|
Displays the message you are composing on your terminal. This is useful to see that the message looks the way you want it to and that it includes the right subject heading and lists of recipients. |
|
Aborts the current message as if you pressed two Ctrl/C interrupts. |
|
Reads the named file into the mail
message.
If the argument begins with an exclamation point ( |
|
Makes
|
|
Adds the names to the
|
|
Invokes the editor specified
by the
|
|
Writes the message to the named file. |
|
Pipes the message through
the named command.
This is useful to make global changes in the message; for
example, if you are including a message in your new message you can use the
You can then add your own text; the result will look like this:
|