Solaris Advanced User's Guide

Printing Messages

You can print a hard copy of a message by piping a message to a printer command. To do so, use the following command form at a mailx prompt:

|number lp

The | symbol is called a pipe. For example, to print a copy of message 2, type:

& |2 lp

Then press Return. If a message number is not specified, mailx pipes the current message to the printer. For more information on piping, see Redirecting and Piping Command Output.