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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

|<br />

mailx<br />

Startup Files<br />

~< !command<br />

Runs the given shell command and adds the standard output of that<br />

command at this point in the message. For example, your message might<br />

contain:<br />

My program is giving me this odd output:<br />

~< !prog<br />

What do you think is causing it?<br />

~: mail_command<br />

Runs the given command-mode mail_command. This is valid only when you<br />

entered mailx in command mode and then went into input mode to<br />

compose a message.<br />

~_ mail_command<br />

Is the same as the ~: command.<br />

~! command<br />

Runs the given shell command. For example, you can use:<br />

>~! ls<br />

to get a list of files in the working directory. The shell that is invoked to run<br />

the command is given by the SHELL environment variable. If the bang<br />

variable is set, mailx replaces each unescaped exclamation mark (!) in<br />

command with the command run by the previous command or ~! command<br />

escape.<br />

~ command<br />

Pipes the current message through the specified shell command. If the<br />

command ends with a successful exit status, the output of the command<br />

replaces the text of the current message. For example:<br />

~|fmt<br />

fills and justifies the lines of your message and replaces the message with<br />

the formatted message. ~| uses the shell given by the SHELL environment<br />

variable to run command.<br />

When you run mailx in command mode, mailx does the following:<br />

v Sets all variables to their default values. mailx processes command-line options,<br />

using them to override any corresponding default values.<br />

v Imports appropriate external environment variables, using them to override any<br />

corresponding default values.<br />

v Reads commands from the system startup file, /etc/mailx.rc. This sets up<br />

variable values and definitions that should be common to all users. If you do not<br />

want mailx to read the system startup file, use the –n option on the mailx<br />

command line.<br />

v After reading and processing the system startup file, mailx does the same with a<br />

personal startup file, which is MAILRC by default. This is a file in your HOME<br />

directory. The name of the file is .mailrc.<br />

Startup files typically set up display options and define aliases. However, any<br />

command is valid in a startup file except for the following:<br />

Copy<br />

edit<br />

followup<br />

Followup<br />

384 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

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

Saved successfully!

Ooh no, something went wrong!