16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Description<br />

Options<br />

Reading Mail<br />

Note: The mail utility is fully supported for compatibility with older <strong>UNIX</strong> systems.<br />

However, it is recommended that the mailx utility be used instead because it<br />

may provide greater functionality and is considered the standard for portable<br />

<strong>UNIX</strong> applications as defined by P<strong>OS</strong>IX.2 IEEE standard 1003.2-1992.<br />

mail lets you read mail sent to you and sends mail to other users. It has two modes<br />

of operation, one for reading mail and one for sending mail. If you start mail without<br />

any arguments, it checks for mail to be read and then presents the messages in<br />

read mode. If you start it with an argument or arguments, it assumes you are<br />

sending a message to the address named as the argument and enters send mode.<br />

The text of the message is taken from standard input until mail encounters either<br />

EOF or a line consisting of only a single dot (.).<br />

For example, to read mail, enter:<br />

mail<br />

To send a mail message to the users Chris and Lee, enter:<br />

mail chris lee<br />

The –t option is used only when sending mail; the others only when reading mail.<br />

–e Tests for the existence of mail and exits. If there is mail in the system<br />

mailbox, the return status is successful.<br />

–f Reads mail from file instead of the system mailbox. This option is often<br />

used to read mail saved in other files.<br />

–p Prints all mail to standard output without querying.<br />

–q Quits the mail session after an interrupt signal; normally, an interrupt ends<br />

only the message being written.<br />

–r Saves messages in first-in, first-out order, the reverse of the default.<br />

Normally, the most recently received message is written first.<br />

–t Lists the recipients at the beginning of the message (default).<br />

When you start mail without arguments, mail checks your system mailbox for mail.<br />

If there is no mail, mail exits with a return code of 1; if there is waiting mail, mail<br />

displays the first message. (If you specify –p on the command line, it displays all<br />

messages.)<br />

<strong>Command</strong>s within mail control how messages are handled. The following<br />

commands are available:<br />

d Deletes the current message.<br />

m[name...]<br />

Sends the current message to the specified user. If a user is not specified,<br />

the mail is sent to you.<br />

p Prints the message on the screen again.<br />

q Quits mail, storing any undeleted messages in the file $HOME/mbox.<br />

mail<br />

s[file] Saves the message in the specified file. If a file is not specified, mail saves<br />

the message in mbox in your home directory.<br />

Chapter 2. Shell command descriptions 369

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!