In the course of composing a letter, you can use tilde commands to perform a variety of functions. Tilde commands usually consist of the tilde character (~) followed by a single character. The following table describes some of the more useful tilde characters. Some of these have already been introduced in this chapter.
If you want to include a literal tilde character in a letter, type two tildes in succession. Only one tilde will be displayed.
Command |
Function |
---|---|
Escapes to a shell command |
|
Simulates pressing Ctrl-D to mark end of file |
|
Lists a summary of tilde commands |
|
Adds user name(s) to the blind carbon copies (Bcc:) list |
|
Adds user name(s) to the carbon copies (Cc:) list |
|
Reads the contents of the dead.letter file into current letter. |
|
|
Forwards the specified letter. Valid only when sending a message while reading mail. |
Prompts for header lines: Subject, To, Cc, and Bcc. |
|
|
Inserts text from the specified letter into the current letter. Valid only when sending a message while reading mail. |
Prints the message being entered to the screen. |
|
Simulates pressing Ctrl-C twice. If the body of the current message is not empty, the contents are saved to dead.letter. |
|
Reads in the text from the specified file. |
|
Changes the subject line to string. |
|
Adds the specified name(s) to the To list. |
|
Writes the current letter without the header into the specified file. |
|
Exits mailx. Similar to ~q except message is not saved in the dead.letter file. |