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 ®le (/usr/share/lib/mailx.rc) to initialize certain parameters, then from a private start-up ®le ($HOME/.mailrc) for personalized vari- ables. Most regular commands are legal inside start-up ®les, the most common use being to set up initial display options and alias lists. The following commands are not legal in the start-up ®le: !, Copy, edit, followup, Followup, hold, mail, preserve, reply, Reply, shell, and visual. Any errors in the start-up ®le cause the remaining lines in the ®le to be ignored.

COMMANDS

The following is a complete list of mailx commands:

m

!command

#comment

=

?

<new-line>

alias alias name ...

group alias name ...

alternates name ...

cd [ directory ] chdir [ directory ]

Escape to the shell. See the description of the SHELL environment variable below.

Null command (comment). Useful in .mailrc ®les.

Print the current message number.

Print a summary of commands.

Advance to next message and print. If this is the ®rst command entered, the ®rst unread message is printed. (To read the current message, use print.)

Declare an alias for the given names. The names are substituted when alias is used as a recipient. Useful in the .mailrc ®le.

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 under ENVIRONMENT VARIABLES.

Change directory. If directory is not speci®ed, $HOME is used.

copy

[ filename ]

 

 

 

copy

[ msglist ] filename

 

 

 

 

Copy messages to the ®le without marking the messages as saved. Otherwise

 

 

 

equivalent to the save command.

 

Copy [ msglist ]

Save the speci®ed messages in a ®le 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. If autoprint is set, the next message after the

 

 

 

last one deleted is printed (see ENVIRONMENT VARIABLES). See also dp.

discard

[ header-field

...]

 

ignore

[ header-field

...]

 

 

 

 

Suppresses printing of the speci®ed header ®elds when displaying messages on the

 

 

 

screen. Examples of header ®elds to ignore are "status" and "cc." The ®elds are

 

 

 

included when the message is saved. The Print and Type commands override this

 

 

 

command.

 

dp[ msglist ]

 

 

 

dt[ msglist ]

Delete the speci®ed 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 ®le and the EDI-

 

 

 

TOR variable is used to get the name of the editor (see ENVIRONMENT VARIABLES).

 

 

 

Default editor is ed (see ed(1)).

 

exit

 

 

 

 

 

Section 1500

 

− 3 −

HP-UX Release 11i: December 2000