⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mail4.nr

📁 早期freebsd实现
💻 NR
字号:
.\" Copyright (c) 1980, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"	@(#)mail4.nr	8.1 (Berkeley) 6/8/93.\".bp.sh 1 "More about sending mail".sh 2 "Tilde escapes".ppWhile typing in a message to be sent to others, it is oftenuseful to be able to invoke the text editor on the partial message,print the message, execute a shell command, or do some otherauxiliary function. .i Mailprovides these capabilities through.i "tilde escapes" ,which consist of a tilde (~) at the beginning of a line, followed bya single character which indicates the function to be performed.  Forexample, to print the text of the message so far, use:.(l~p.)lwhich will print a line of dashes, the recipients of your message, andthe text of the message so far.Since.i Mailrequires two consecutive \s-2RUBOUT\s0's to abort a letter, youcan use a single \s-2RUBOUT\s0 to abort the output of ~p or any other~ escape without killing your letter..ppIf you are dissatisfied with the message asit stands, you can invoke the text editor on it using the escape.(l~e.)lwhich causes the message to be copied into a temporary file and aninstance of the editor to be spawned.  After modifying the message toyour satisfaction, write it out and quit the editor. .i Mailwill respondby typing.(l(continue).)lafter which you may continue typing text which will be appended to yourmessage, or type <control-d> to end the message.A standard text editor is provided by.i Mail .You can override this default by setting the valued option.q EDITORto something else.  For example, you might prefer:.(lset EDITOR=/usr/ucb/ex.)l.ppMany systems offer a screen editor as an alternative to the standardtext editor, such as the.i vieditor from UC Berkeley.To use the screen, or.i visualeditor, on your current message, you can use the escape,.(l~v.)l~v works like ~e, except that the screen editor is invoked instead.A default screen editor is defined by.i Mail .If it does not suit you, you can set the valued option.q VISUALto the path name of a different editor..ppIt is often useful to be able to include the contents of somefile in your message; the escape.(l~r filename.)lis provided for this purpose, and causes the named file to be appendedto your current message. .i Mailcomplains if the file doesn't existor can't be read.  If the read is successful, the number of lines andcharacters appended to your message is printed, after which you may continueappending text.  The filename may contain shell metacharacters like * and ?which are expanded according to the conventions of your shell..ppAs a special case of ~r, the escape.(l~d.)lreads in the file.q dead.letterin your home directory.  This is often useful since.i Mailcopies the textof your message there when you abort a message with \s-2RUBOUT\s0..ppTo save the current text of your message on a file you may use the.(l~w filename.)lescape. .i Mailwill print out the number of lines and characters writtento the file, after which you may continue appending text to your message.Shell metacharacters may be used in the filename, as in ~r and are expandedwith the conventions of your shell..ppIf you are sending mail from within.i Mail'scommand modeyou can read a message sent to you into the messageyou are constructing with the escape:.(l~m 4.)lwhich will read message 4 into the current message, shifted right byone tab stop.  You can name any non-deleted message, or list of messages.Messages can also be forwarded without shifting by a tab stop with ~f.This is the usual way to forward a message..ppIf, in the process of composing a message, you decide to add additionalpeople to the list of message recipients, you can do so with the escape.(l~t name1 name2 ....)lYou may name as few or many additional recipients as you wish.  Notethat the users originally on the recipient list will still receivethe message; you cannot remove someone from the recipientlist with ~t..ppIf you wish, you can associate a subject with your message by using theescape.(l~s Arbitrary string of text.)lwhich replaces any previous subject with.q "Arbitrary string of text."The subject, if given, is sent near thetop of the message prefixed with.q "Subject:"You can see what the message will look like by using ~p..ppFor political reasons, one occasionally prefers to list certainpeople as recipients of carbon copies of a message rather thandirect recipients.  The escape.(l~c name1 name2 ....)ladds the named people to the.q "Cc:"list, similar to ~t.Again, you can execute ~p to see what the message will look like..ppThe escape.(l~b name1 name2 ....)ladds the named people to the.q "Cc:"list, but does not make the names visible in the.q "Cc:"line ("blind" carbon copy)..ppThe recipients of the message together constitute the.q "To:"field, the subject the.q "Subject:"field, and the carbon copies the.q "Cc:"field.  If you wish to edit these in ways impossible with the ~t, ~s, ~cand ~b escapes, you can use the escape.(l~h.)lwhich prints.q "To:"followed by the current list of recipients and leaves the cursor(or printhead) at the end of the line.  If you type in ordinarycharacters, they are appended to the end of the current list ofrecipients.  You can also use your erase character to erase back intothe list of recipients, or your kill character to erase them altogether.Thus, for example, if your erase and kill characters are the standard(on printing terminals) # and @ symbols,.(l~hTo: root kurt####bill.)lwould change the initial recipients.q "root kurt"to.q "root bill."When you type a newline,.i Mailadvances to the.q "Subject:"field, where the same rules apply.  Another newline brings you tothe.q "Cc:"field, which may be edited in the same fashion.  Another newlinebrings you to the.q "Bcc:"("blind" carbon copy) field, which follows the same rules as the "Cc:"field.  Another newlineleaves you appending text to the end of your message.  You can use~p to print the current text of the header fields and the bodyof the message..ppTo effect a temporary escape to the shell, the escape.(l~!command.)lis used, which executes.i commandand returns you to mailing mode without altering the text ofyour message.  If you wish, instead, to filter the body of yourmessage through a shell command, then you can use.(l~|command.)lwhich pipes your message through the command and uses the outputas the new text of your message.  If the command produces no output,.i Mailassumes that something is amiss and retains the old versionof your message.  A frequently-used filter is the command.i fmt ,designed to format outgoing mail..ppTo effect a temporary escape to.i Mailcommand mode instead, you can use the.(l~:\fIMail command\fP.)lescape.  This is especially useful for retyping the message you arereplying to, using, for example:.(l~:t.)lIt is also useful for setting options and modifying aliases..ppIf you wish abort the current message, you can use the escape.(l~q.)lThis will terminate the current message and return you to theshell (or \fIMail\fP if you were using the \fBmail\fP command).If the \fBsave\fP option is set, the message will be copiedto the file.q dead.letterin your home directory..ppIf you wish (for some reason) to send a message that containsa line beginning with a tilde, you must double it.  Thus, for example,.(l~~This line begins with a tilde..)lsends the line.(l~This line begins with a tilde..)l.ppFinally, the escape.(l~?.)lprints out a brief summary of the available tilde escapes..ppOn some terminals (particularly ones with no lower case)tilde's are difficult to type..i Mailallows you to change the escape character with the.q escapeoption.  For example, I set.(lset escape=].)land use a right bracket instead of a tilde.  If I ever need tosend a line beginning with right bracket, I double it, just as for ~.Changing the escape character removes the special meaning of ~..sh 2 "Network access".ppThis section describes how to send mail to people on other machines.Recall that sending to a plain login name sends mail to that personon your machine.  If your machine is directly (or sometimes, even,indirectly) connected to the Arpanet, you can send messages to peopleon the Arpanet using a name of the form.(lname@host.domain.)lwhere.i nameis the login name of the person you're trying to reach,.i hostis the name of the machine on the Arpanet,and .i domainis the higher-level scope within which the hostname is known, e.g. EDU (for educationalinstitutions), COM (for commercial entities), GOV (for governmental agencies),ARPA for many other things, BITNET or CSNET for those networks..ppIf your recipient logs in on a machine connected to yours byUUCP (the Bell Laboratories supplied network that communicatesover telephone lines), sending mail can be a bit more complicated.You must know the list of machines through which your message musttravel to arrive at his site.  So, if his machine is directly connectedto yours, you can send mail to him using the syntax:.(lhost!name.)lwhere, again,.i hostis the name of the machine and.i nameis the login name.If your message must go through an intermediary machine first, youmust use the syntax:.(lintermediary!host!name.)land so on.  It is actually a feature of UUCP that the map of allthe systems in the network is not known anywhere (except where peopledecide to write it down for convenience).  Talk to your system administratorabout good ways to get places; the.i uunamecommand will tell you systems whose names are recognized, but not whichones are frequently called or well-connected..ppWhen you use the.b replycommand to respond to a letter, there is a problem of figuring out thenames of the users in the.q "To:"and.q "Cc:"lists.i "relative to the current machine" .If the original letter was sent to you by someone on the local machine,then this problem does not exist, but if the message came from a remotemachine, the problem must be dealt with..i Mailuses a heuristic to build the correct name for each user relativeto the local machine.  So, when you.b replyto remote mail, the names in the.q "To:"and.q "Cc:"lists may change somewhat..sh 2 "Special recipients".ppAs described previously, you can send mail to either user names or.b aliasnames.  It is also possible to send messages directly to files or toprograms, using special conventions.  If a recipient name has a`/' in it or begins with a `+', it is assumed to be thepath name of a file into whichto send the message.  If the file already exists, the message isappended to the end of the file.  If you want to name a file inyour current directory (ie, one for which a `/' would not usuallybe needed) you can precede the name with `./'So, to send mail to the file.q memoin the current directory, you can give the command:.(l% Mail ./memo.)lIf the name begins with a `+,' it is expanded into the full path nameof the folder name in your folder directory.This ability to send mail to files can be used for a variety ofpurposes, such as maintaining a journal and keeping a record ofmail sent to a certain group of users.  The second example can bedone automatically by including the full pathname of the recordfile in the.b aliascommand for the group.  Using our previous.b aliasexample, you might give the command:.(lalias project sam sally steve susan /usr/project/mail_record.)lThen, all mail sent to "project" would be saved on the file.q /usr/project/mail_recordas well as being sent to the members of the project.  This filecan be examined using.i "Mail \-f" ..ppIt is sometimes useful to send mail directly to a program, forexample one might write a project billboard program and want to accessit using.i Mail .To send messages to the billboard program, one can send mailto the special name `|billboard' for example..i Mailtreats recipient names that begin with a `|' as a program to sendthe mail to.  An.b aliascan be set up to reference a `|' prefaced name if desired..i Caveats :the shell treats `|' specially, so it must be quoted on the commandline.  Also, the `| program' must be presented as a single argument tomail.  The safest course is to surround the entire name with doublequotes.  This also applies to usage in the.b aliascommand.  For example, if we wanted to alias `rmsgs' to `rmsgs \-s'we would need to say:.(lalias rmsgs "| rmsgs -s".)l

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -