HP-UX Reference (11i v2 04/09) - 1 User Commands A-M (vol 1)

m
mailx(1) mailx(1)
Other arguments are usually arbitrary strings whose usage depends on the command involved.
File names, where expected, are expanded using normal shell conventions (see sh(1)). Special characters
are recognized by certain commands, and are documented with the commands below.
At start-up time,
mailx reads commands from a system-wide file (
/usr/share/lib/mailx.rc
)to
initialize certain parameters, then from a private start-up file (
$HOME/.mailrc) for personalized vari-
ables. Most regular commands are legal inside start-up files, the most common use being to set up initial
display options and alias lists. The following commands are not legal in the start-up file:
!, Copy, edit,
followup, Followup, hold, mail,
preserve, reply, Reply, shell, and visual. Any errors in the start-up file
cause the remaining lines in the file to be ignored.
COMMANDS
The following is a complete list of
mailx commands:
! command Escape to the shell. See the description of the
SHELL environment variable below.
# comment Null command (comment). Useful in .mailrc
files.
= Print the current message number.
? Print a summary of commands.
newline Advance to next message and
print. If this is the first command entered, the first
unread message is printed. (To read the current message, use print.)
alias alias name...
group alias name... Declare an alias for the given names. The names are substituted when alias is used
as a recipient. Useful in the
.mailrc file.
alternates name... Declares a list of alternate names for your login. When responding to a message,
these names are removed from the list of recipients for the response. With no argu-
ments, alternates prints the current list of alternate names. See also allnet in
the Environment Variables subsection.
cd [directory]
chdir [directory] Change directory. If directory is not specified,
$HOME is used.
copy [filename]
copy [msglist] filename
Copy messages to the file without marking the messages as saved. Otherwise
equivalent to the save command.
Copy [msglist] Save the specified messages in a file whose name is derived from the author of the
message to be saved, without marking the messages as saved. Otherwise equivalent
to the Save command.
delete [msglist] Delete messages from the mailbox .Ifautoprint
is set, the next message after
the last one deleted is printed (see the Environment Variables subsection). See also
dp.
discard [header-field ...]
ignore [header-field ...]
Suppresses printing of the specified header fields when displaying messages on the
screen. Examples of header fields to ignore are "status" and "cc." The fields are
included when the message is saved. The Print and Type commands override this
command.
dp[msglist]
dt[msglist] Delete the specified messages from the mailbox and print the next message after the
last one deleted. Roughly equivalent to a delete command followed by a print com-
mand.
echo string ... Echo the given string or strings (similar to echo − see echo(1)).
edit [msglist] Edit the given messages. The messages are placed in a temporary file and the
EDITOR variable is used to get the name of the editor (see the Environment Vari-
ables subsection). Default editor is ed (see ed(1)).
exit
HP-UX 11i Version 2: September 2004 − 3 − Hewlett-Packard Company Section 1−−555