1 .\" This file is automatically generated. Do not edit!
2 .\" @(#)$Id: scan.rf,v 1.14 1995/12/06 23:22:17 jromine Exp $
5 scan \- produce a one line per message scan listing
9 \%[\-clear] \%[\-noclear]
10 \%[\-form\ formatfile]
12 \%[\-header] \%[\-noheader]
14 \%[\-reverse] \%[\-noreverse]
18 \fIScan\fR produces a one\-line\-per\-message listing of the specified
20 Each \fIscan\fR line contains the message number (name),
21 the date, the \*(lqFrom:\*(rq field, the \*(lqSubject\*(rq field, and, if room
22 allows, some of the body of the message.
27 .ta \w'15+- 'u +\w'07/\|05x 'u +\w'Dcrocker 'u
28 15+ 07/\|05 Dcrocker nned\0\0\*(<<Last week I asked some of
29 16\0- 07/\|05 dcrocker message id format\0\0\*(<<I recommend
30 18 07/\|06 Obrien Re: Exit status from mkdir
31 19 07/\|07* Obrien \*(lqscan\*(rq listing format in MH
36 The `+' on message 15 indicates that it is the current message.
37 The `\-' on message 16 indicates that it has been
38 replied to, as indicated by a \*(lqReplied:\*(rq component (produced by
39 the `\-annotate' switch to the \fIrepl\fR command).
40 The `*' on message 19 indicates that there was no \*(lqDate:\*(rq
41 header present (the last write date of the message is given instead).
43 If there is sufficient room left on the \fIscan\fR line after the
44 subject, the line will be filled with text from the body,
45 preceded by <<, and terminated by >> if the body is sufficiently short.
46 \fIScan\fR actually reads each of the specified
47 messages and parses them to extract the desired fields.
48 During parsing, appropriate error messages will be produced if
49 there are format errors in any of the messages.
51 The `\-header' switch produces a header line prior to the \fIscan\fR
54 the name of the folder and the current date and time are output
55 (see the \fBHISTORY\fR section for more information).
57 If the `\-clear' switch is used and \fIscan's\fR output is directed to a
59 then \fIscan\fR will consult the \fB$TERM\fR and \fB$TERMCAP\fR
60 envariables to determine your
61 terminal type in order to find out how to clear the screen prior to exiting.
62 If the `\-clear' switch is used and \fIscan's\fR output is not directed to
63 a terminal (e.g., a pipe or a file),
64 then \fIscan\fR will send a formfeed prior to exiting.
66 For example, the command:
69 (scan \-clear \-header; show all \-show pr \-f) | lpr
71 produces a scan listing of the current folder, followed by a formfeed,
72 followed by a formatted listing of all messages in the folder, one per
73 page. Omitting `\-show\ pr\ \-f' will cause the messages to be concatenated,
74 separated by a one\-line header and two blank lines.
76 To override the output format used by \fIscan\fR,
77 the `\-format\ string' or `\-form\ file' switches are used.
78 This permits individual fields of the scan listing to be extracted with ease.
79 The string is simply a format string and the file is simply a format file.
80 See \fImh\-format\fR\0(5) for the details.
82 In addition to the standard \fImh\-format\fR\0(5) escapes,
83 \fIscan\fR also recognizes the following additional \fIcomponent\fR escapes:
86 .ta \w'Dtimenow 'u +\w'Returns 'u
87 \fIEscape\fR \fIReturns\fR \fIDescription\fR
88 body string the (compressed) first part of the body
89 dtimenow date the current date
90 folder string the name of the current folder
94 .\" and the following \fIfunction\fP escape:
97 .\" .ta \w'Dcompflagxfolderx 'u +\w'Returns 'u
98 .\" \fIEscape\fR \fIReturns\fR \fIDescription\fR
99 .\" compflag{folder} integer boolean state of `\-header'
103 If no date header is present in the message, the \fIfunction\fR
104 escapes which operate on {\fIdate\fP\|} will return values for the
105 date of last modification of the message file itself.
106 This is particularly handy for scanning a \fIdraft folder\fR,
107 as message drafts usually aren't allowed to have dates in them.
109 \fIscan\fR will update the \fIMH\fR context prior to starting the listing,
110 so interrupting a long \fIscan\fR listing preserves the new context.
111 \fIMH\fR purists hate this idea.
113 ^$HOME/\&.mh\(ruprofile~^The user profile
115 ^Path:~^To determine the user's MH directory
117 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
119 ^Current\-Folder:~^To find the default current folder
121 inc(1), pick(1), show(1), mh\-format(5)
123 `+folder' defaults to the folder current
125 `msgs' defaults to all
127 `\-format' defaulted as described above
131 `\-width' defaulted to the width of the terminal
133 If a folder is given, it will become the current folder.
135 Prior to using the format string mechanism,
136 `\-header' used to generate a heading saying what each column in the listing
138 Format strings prevent this from happening.
140 The argument to the `\-format' switch must be interpreted as a single token
141 by the shell that invokes \fIscan\fR.
143 one must usually place the argument to this switch inside double\-quotes.
146 each \fIcomponent\fR escape is set by \fIscan\fR to the contents
147 of the first message header \fIscan\fR encounters
148 with the corresponding component name;
149 any following headers with the same component name are ignored.
151 The switch `\-reverse', makes \fIscan\fR list the messages
152 in reverse order; this should be considered a bug.
154 The `\-file filename' switch allows the user to obtain a \fIscan\fP
155 listing of a maildrop file as produced by \fIpackf\fP. This listing
156 includes every message in the file. The user should use \fImsh\fP
157 for more selective processing of the file. `\-reverse' is ignored