📄 mailx.html
字号:
<dd><pre><tt>di</tt><b>[</b><tt>scard</tt><b>] [</b><i>header-field</i><tt>...</tt><b>]</b><tt>ig</tt><b>[</b><tt>nore</tt><b>] [</b><i>header-field</i><tt>...</tt><b>]</b></pre></dd></dl><p>Suppress the specified header fields when writing messages. Specified <i>header-fields</i> shall be added to the list ofsuppressed header fields. Examples of header fields to ignore are <b>status</b> and <b>cc</b>. The fields shall be included whenthe message is saved. The <b>Print</b> and <b>Type</b> commands shall override this command. The comparison of header fields shallbe in a case-insensitive manner. If no arguments are specified, write a list of the currently suppressed header fields to standardoutput; the listing need not reflect the same order of header fields that were entered.</p><p>If both <b>retain</b> and <b>discard</b> commands are given, <b>discard</b> commands shall be ignored.</p><h5><a name="tag_04_83_13_10"></a>Delete Messages and Display</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>dp</tt> <b>[</b><i>msglist</i><b>]</b><tt>dt</tt> <b>[</b><i>msglist</i><b>]</b></pre></dd></dl><p>Delete the specified messages as described for the <b>delete</b> command, except that the <b>autoprint</b> variable shall haveno effect, and the current message shall be written only if it was set to a message after the last message deleted by the command.Otherwise, an informational message to the effect that there are no further messages in the mailbox shall be written, followed bythe <i>mailx</i> prompt.</p><h5><a name="tag_04_83_13_11"></a>Echo a String</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>ec</tt><b>[</b><tt>ho</tt><b>]</b> <i>string</i> <tt>...</tt></pre></dd></dl><p>Echo the given strings, equivalent to the shell <a href="../utilities/echo.html"><i>echo</i></a> utility.</p><h5><a name="tag_04_83_13_12"></a>Edit Messages</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>e</tt><b>[</b><tt>dit</tt><b>] [</b><i>msglist</i><b>]</b></pre></dd></dl><p>Edit the given messages. The messages shall be placed in a temporary file and the utility named by the <i>EDITOR</i> variable isinvoked to edit each file in sequence. The default <i>EDITOR</i> is unspecified.</p><p>The <b>edit</b> command does not modify the contents of those messages in the mailbox.</p><h5><a name="tag_04_83_13_13"></a>Exit</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>ex</tt><b>[</b><tt>it</tt><b>]</b><tt>x</tt><b>[</b><tt>it</tt><b>]</b></pre></dd></dl><p>Exit from <i>mailx</i> without changing the mailbox. No messages shall be saved in the <b>mbox</b> (see also <b>quit</b>).</p><h5><a name="tag_04_83_13_14"></a>Change Folder</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>fi</tt><b>[</b><tt>le</tt><b>] [</b><i>file</i><b>]</b><tt>fold</tt><b>[</b><tt>er</tt><b>] [</b><i>file</i><b>]</b></pre></dd></dl><p>Quit (see the <b>quit</b> command) from the current file of messages and read in the file named by the pathname <i>file</i>. Ifno argument is given, the name and status of the current mailbox shall be written.</p><p>Several unquoted special characters shall be recognized when used as <i>file</i> names, with the following substitutions:</p><dl compact><dt><tt>%</tt></dt><dd>The system mailbox for the invoking user.</dd><dt><tt>%</tt><i>user</i></dt><dd>The system mailbox for <i>user</i>.</dd><dt><tt>#</tt></dt><dd>The previous file.</dd><dt><tt>&</tt></dt><dd>The current <b>mbox</b>.</dd><dt><tt>+</tt><i>file</i></dt><dd>The named file in the <b>folder</b> directory. (See the <b>folder</b> variable.)</dd></dl><p>The default file shall be the current mailbox.</p><h5><a name="tag_04_83_13_15"></a>Display List of Folders</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>folders</tt></pre></dd></dl><p>Write the names of the files in the directory set by the <b>folder</b> variable. The command specified by the <i>LISTER</i>environment variable shall be used (see the ENVIRONMENT VARIABLES section).</p><h5><a name="tag_04_83_13_16"></a>Follow Up Specified Messages</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>fo</tt><b>[</b><tt>llowup</tt><b>] [</b><i>message</i><b>]</b><tt>F</tt><b>[</b><tt>ollowup</tt><b>] [</b><i>msglist</i><b>]</b></pre></dd></dl><p>In the lowercase form, respond to a message, recording the response in a file whose name is derived from the author of themessage. See also the <b>save</b> and <b>copy</b> commands and <b>outfolder</b>.</p><p>In the capitalized form, respond to the first message in the <i>msglist</i>, sending the message to the author of each messagein the <i>msglist</i>. The subject line shall be taken from the first message and the response shall be recorded in a file whosename is derived from the author of the first message. See also the <b>Save</b> and <b>Copy</b> commands and <b>outfolder</b>.</p><p>Both forms shall override the <b>record</b> variable, if set.</p><h5><a name="tag_04_83_13_17"></a>Display Header Summary for Specified Messages</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>f</tt><b>[</b><tt>rom</tt><b>] [</b><i>msglist</i><b>]</b></pre></dd></dl><p>Write the header summary for the specified messages.</p><h5><a name="tag_04_83_13_18"></a>Display Header Summary</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>h</tt><b>[</b><tt>eaders</tt><b>] [</b><i>message</i><b>]</b></pre></dd></dl><p>Write the page of headers that includes the message specified. If the <i>message</i> argument is not specified, the currentmessage shall not change. However, if the <i>message</i> argument is specified, the current message shall become the message thatappears at the top of the page of headers that includes the message specified. The <b>screen</b> variable sets the number ofheaders per page. See also the <b>z</b> command.</p><h5><a name="tag_04_83_13_19"></a>Help</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>hel</tt><b>[</b><tt>p</tt><b>]</b><tt>?</tt></pre></dd></dl><p>Write a summary of commands.</p><h5><a name="tag_04_83_13_20"></a>Hold Messages</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>ho</tt><b>[</b><tt>ld</tt><b>] [</b><i>msglist</i><b>]</b><tt>pre</tt><b>[</b><tt>serve</tt><b>] [</b><i>msglist</i><b>]</b></pre></dd></dl><p>Mark the messages in <i>msglist</i> to be retained in the mailbox when <i>mailx</i> terminates. This shall override any commandsthat might previously have marked the messages to be deleted. During the current invocation of <i>mailx</i>, only the<b>delete</b>, <b>dp</b>, or <b>dt</b> commands shall remove the <i>preserve</i> marking of a message.</p><h5><a name="tag_04_83_13_21"></a>Execute Commands Conditionally</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>i</tt><b>[</b><tt>f</tt><b>]</b> <tt>s|r</tt><i>mail-command</i><tt>sel</tt><b>[</b><tt>se</tt><b>]</b><i>mail-command</i><tt>sen</tt><b>[</b><tt>dif</tt><b>]</b></pre></dd></dl><p>Execute commands conditionally, where <b>if s</b> executes the following <i>mail-command</i>s, up to an <b>else</b> or<b>endif</b>, if the program is in Send Mode, and <b>if r</b> shall cause the <i>mail-command</i>s to be executed only inReceive Mode.</p><h5><a name="tag_04_83_13_22"></a>List Available Commands</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>l</tt><b>[</b><tt>ist</tt><b>]</b></pre></dd></dl><p>Write a list of all commands available. No explanation shall be given.</p><h5><a name="tag_04_83_13_23"></a>Mail a Message</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>m</tt><b>[</b><tt>ail</tt><b>]</b> <i>address</i><tt>...</tt></pre></dd></dl><p>Mail a message to the specified addresses or aliases.</p><h5><a name="tag_04_83_13_24"></a>Direct Messages to mbox</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>mb</tt><b>[</b><tt>ox</tt><b>] [</b><i>msglist</i><b>]</b></pre></dd></dl><p>Arrange for the given messages to end up in the <b>mbox</b> save file when <i>mailx</i> terminates normally. See <i>MBOX .</i>See also the <b>exit</b> and <b>quit</b> commands.</p><h5><a name="tag_04_83_13_25"></a>Process Next Specified Message</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>n</tt><b>[</b><tt>ext</tt><b>] [</b><i>message</i><b>]</b></pre></dd></dl><p>If the current message has not been written (for example, by the <b>print</b> command) since <i>mailx</i> started or since anyother message was the current message, behave as if the <b>print</b> command was entered. Otherwise, if there is an undeletedmessage after the current message, make it the current message and behave as if the <b>print</b> command was entered. Otherwise, aninformational message to the effect that there are no further messages in the mailbox shall be written, followed by the<i>mailx</i> prompt.</p><h5><a name="tag_04_83_13_26"></a>Pipe Message</h5><dl compact><dt><i>Synopsis</i>:</dt><dd><pre><tt>pi</tt><b>[</b><tt>pe</tt><b>] [[</b><i>msglist</i><b>]</b> <i>command</i><b>]</b><tt>|</tt> <b>[[</b><i>msglist</i><b>]</b> <i>command</i><b>]</b></pre></dd></dl><p>Pipe the messages through the given <i>command</i> by invoking the command interpreter specified by <i>SHELL</i> with twoarguments: <b>-c</b> and <i>command</i>. (See also <a href="../utilities/sh.html"><i>sh</i></a> <b>-c</b>.) The application shallensure that the command is given as a single argument. Quoting, described previously, can be used to accomplish this. If noarguments are given, the current message shall be piped through the command specified by the value of the <b>cmd</b> variable. Ifthe <b>page</b> variable is set, a <form-feed> shall be inserted after each message.</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -