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

📄 scan.rf

📁 早期freebsd实现
💻 RF
字号:
.\"	@(MHWARNING).\" @(#)$Id: scan.rf,v 1.12 1993/08/19 20:43:27 jromine Exp $.SC SCAN 1.NAscan \- produce a one line per message scan listing.SYscan\%[+folder] \%[msgs]\%[\-clear] \%[\-noclear]\%[\-form\ formatfile]\%[\-format\ string]\%[\-header] \%[\-noheader]\%[\-width\ columns]\%[\-reverse] \%[\-noreverse]\%[\-file filename]\%[\-help].DE\fIScan\fR produces a one\-line\-per\-message listing of the specifiedmessages.Each \fIscan\fR line contains the message number (name),the date, the \*(lqFrom:\*(rq field, the \*(lqSubject\*(rq field, and, if roomallows, some of the body of the message.For example:.nf.in +.5i.ta \w'15+- 'u +\w'7/\05  'u +\w'Dcrocker  'u15+	7/\05	Dcrocker	nned\0\0\*(<<Last week I asked some of16\0-	7/\05	dcrocker	message id format\0\0\*(<<I recommend18	7/\06	Obrien	Re: Exit status from mkdir19	7/\07	Obrien	\*(lqscan\*(rq listing format in MH.re.in -.5i.fiThe `+' on message 15 indicates that it is the current message.The `\-' on message 16 indicates that it has beenreplied to, as indicated by a \*(lqReplied:\*(rq component produced byan `\-annotate' switch to the \fIrepl\fR command.If there is sufficient room left on the \fIscan\fR line after thesubject, the line will be filled with text from the body,preceded by <<, and terminated by >> if the body is sufficiently short.\fIScan\fR actually reads each of the specifiedmessages and parses them to extract the desired fields.During parsing, appropriate error messages will be produced ifthere are format errors in any of the messages.The `\-header' switch produces a header line prior to the \fIscan\fRlisting.Currently,the name of the folder and the current date and time are output(see the \fBHISTORY\fR section for more information).If the `\-clear' switch is used and \fIscan's\fR output is directed to aterminal,then \fIscan\fR will consult the \fB$TERM\fR and \fB$TERMCAP\fRenvariables to determine yourterminal type in order to find out how to clear the screen prior to exiting.If the `\-clear' switch is used and \fIscan's\fR output is not directed toa terminal (e.g., a pipe or a file),then \fIscan\fR will send a formfeed prior to exiting.For example, the command:.ti +.5i(scan \-clear \-header; show all \-show pr \-f) | lprproduces a scan listing of the current folder, followed by a formfeed,followed by a formatted listing of all messages in the folder, one perpage.  Omitting `\-show\ pr\ \-f' will cause the messages to be concatenated,separated by a one\-line header and two blank lines.If \fIscan\fR encounters a message without a \*(lqDate:\*(rq field,rather than leaving that portion of the scan listing blank,the date is filled\-in with the last write date of the message,and post\-fixed with a `*'.This is particularly handy for scanning a \fIdraft folder\fR,as message drafts usually aren't allowed to have dates in them.To override the output format used by \fIscan\fR,the `\-format\ string' or `\-form\ file' switches are used.This permits individual fields of the scan listing to be extracted with ease.The string is simply a format string and the file is simply a format file.See \fImh\-format\fR\0(5) for the details.In addition to the standard \fImh\-format\fR\0(5) escapes,\fIscan\fR also recognizes the following additional \fIcomponent\fR escapes:.sp 1.nf.ta \w'Dtimenow  'u +\w'Returns  'u\fIEscape\fR	\fIReturns\fR	\fIDescription\fRbody	string	the (compressed) first part of the bodydtimenow	date	the current datefolder	string	the name of the current folder.re.fiAlso, if no date header was present in the message, the \fIfunction\fRescapes which operate on {\fIdate\fP\|} will return values for the date of last modification of the message file itself.\fIscan\fR will update the \fIMH\fR context prior to starting the listing,so interrupting a long \fIscan\fR listing preserves the new context.\fIMH\fR purists hate this idea..Fi^$HOME/\&.mh\(ruprofile~^The user profile.Pr^Path:~^To determine the user's MH directory.Ps^Alternate\-Mailboxes:~^To determine the user's mailboxes.Ps^Current\-Folder:~^To find the default current folder.Sainc(1), pick(1), show(1), mh\-format(5).De`+folder' defaults to the folder current.Ds`msgs' defaults to all.Ds`\-format' defaulted as described above.Ds`\-noheader'.Ds`\-width' defaulted to the width of the terminal.CoIf a folder is given, it will become the current folder..HiPrior to using the format string mechanism,`\-header' used to generate a heading saying what each column in the listingwas.Format strings prevent this from happening..BuThe argument to the `\-format' switch must be interpreted as a single tokenby the shell that invokes \fIscan\fR.Therefore,one must usually place the argument to this switch inside double\-quotes..brThe value ofeach \fIcomponent\fR escape is set by \fIscan\fR to the contentsof the first message header \fIscan\fR encounterswith the corresponding component name;any following headers with the same component name are ignored..spThe switch `\-reverse', makes \fIscan\fR list the messagesin reverse order; this should be considered a bug..spThe `\-file filename' switch allows the user to obtain a \fIscan\fPlisting of a maildrop file as produced by \fIpackf\fP.  This listingincludes every message in the file.  The user should use \fImsh\fPfor more selective processing of the file.  `\-reverse' is ignoredwith this option..En

⌨️ 快捷键说明

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