5 .TH SCAN %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
7 scan \- produce a one line per message scan listing
14 .RB [ \-clear " | " \-noclear ]
19 .RB [ \-header " | " \-noheader ]
22 .RB [ \-reverse " | " \-noreverse ]
30 produces a one\-line\-per\-message listing of the specified
31 folder or messages. Each
33 line contains the message number
34 (name), the date, the \*(lqFrom:\*(rq field, the \*(lqSubject\*(rq field,
35 and, if room allows, some of the body of the message. For example:
39 .ta \w'15+- 'u +\w'07/\|05x 'u +\w'Dcrocker 'u
40 15+ 10/\|05 crocker nned\0\0<<Last week I asked some of
41 16\- 10/\|05 crocker message id format\0\0\<<I recommend
42 18 10/\|06 brien Re: Exit status from mkdir
43 19 10/\|07*brien \*(lqscan\*(rq listing format in nmh
47 The `+' on message 15 indicates that it is the current message.
49 The `\-' on message 16 indicates that it has been replied to, as indicated
50 by a \*(lqReplied:\*(rq component (produced by the
57 The `*' on message 19 indicates that no \*(lqDate:\*(rq header was
58 present. The time of last modification of the message is given instead.
60 If there is sufficient room left on the
63 subject, the line will be filled with text from the body, preceded by
64 \*(lq<<\*(rq, and terminated by \*(lq>>\*(rq if the body is sufficiently short.
66 actually reads each of the specified messages and parses them to extract
67 the desired fields. During parsing, appropriate error messages will be
68 produced if there are format errors in any of the messages.
72 will decode RFC-2047 (MIME) encoding in
75 will only decode these fields if your
76 terminal can natively display the character set used in the encoding.
77 You should set the MM_CHARSET environment variable to your native
78 character set, if it is not US-ASCII. See the mh-profile(5) man
79 page for details about this environment variable.
85 list the messages in reverse
91 switch allows the user to obtain a
93 listing of a maildrop file as produced by
96 includes every message in the file (you can't scan individual messages).
99 is ignored with this option.
104 may be used to specify the width of
105 the scan line. The default is to use the width of the terminal.
109 switch produces a header line prior to the
111 listing. Currently, the name of the folder and the current date and
112 time are output (see the
114 section for more information).
123 will consult the environment variables
127 to determine your terminal type in order
128 to find out how to clear the screen prior to exiting. If the
132 output is not directed to a terminal
133 (e.g., a pipe or a file), then
135 will send a formfeed prior
138 For example, the command:
141 (scan \-clear \-header; show all \-show pr \-f) | lpr
144 produces a scan listing of the current folder, followed by a formfeed,
145 followed by a formatted listing of all messages in the folder, one
147 .RB \*(lq "\-show\ pr\ \-f" \*(rq
148 will cause the messages to be
149 concatenated, separated by a one\-line header and two blank lines.
151 To override the output format used by
159 switches are used. This permits individual fields of
160 the scan listing to be extracted with ease. The string is simply a format
161 string and the file is simply a format file. See
165 In addition to the standard
169 also recognizes the following additional
175 .ta \w'Dtimenow 'u +\w'Returns 'u
176 .I Escape Returns Description
177 body string the (compressed) first part of the body
178 dtimenow date the current date
179 folder string the name of the current folder
183 If no date header is present in the message, the
188 will return values for the date of last
189 modification of the message file itself. This feature is handy for
190 scanning a draft folder, as message drafts usually aren't allowed
191 to have dates in them.
196 context prior to starting the listing,
197 so interrupting a long
199 listing preserves the new context.
201 purists hate this idea.
206 .ta \w'%etcdir%/ExtraBigFileName 'u
207 ^$HOME/\&.mh\(ruprofile~^The user profile
210 .SH "PROFILE COMPONENTS"
214 .ta \w'ExtraBigProfileName 'u
215 ^Path:~^To determine the user's nmh directory
216 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
217 ^Current\-Folder:~^To find the default current folder
221 inc(1), pick(1), show(1), mh\-format(5)
225 .RB ` +folder "' defaults to the current folder"
226 .RB ` msgs "' defaults to all"
227 .RB ` \-format "' defaulted as described above"
229 .RB ` \-width "' defaulted to the width of the terminal"
233 If a folder is given, it will become the current folder.
236 Prior to using the format string mechanism,
239 a heading saying what each column in the listing was. Format strings
240 prevent this from happening.
245 switch must be interpreted as a single
246 token by the shell that invokes
248 Therefore, one must usually
249 place the argument to this switch inside double\-quotes.
256 contents of the first message header
259 corresponding component name; any following headers with the same
260 component name are ignored.