4 .TH SCAN %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 scan \- produce a one line per message scan listing
13 .RB [ \-clear " | " \-noclear ]
27 produces a one\-line\-per\-message listing of the specified
28 folder or messages. Each
30 line contains the message number
31 (name), the date, the \*(lqFrom:\*(rq field, the \*(lqSubject\*(rq field,
32 and, if room allows, some of the body of the message. For example:
36 .ta \w'15+- 'u +\w'07/\|05x 'u +\w'Dcrocker 'u
37 15+ 10/\|05 crocker nned\0\0<<Last week I asked some of
38 16\- 10/\|05 crocker message id format\0\0\<<I recommend
39 18 10/\|06 brien Re: Exit status from mkdir
40 19 10/\|07*brien \*(lqscan\*(rq listing format in nmh
44 The `+' on message 15 indicates that it is the current message.
46 The `\-' on message 16 indicates that it has been replied to, as indicated
47 by a \*(lqReplied:\*(rq component (produced by the
54 The `*' on message 19 indicates that no \*(lqDate:\*(rq header was
55 present. The time of last modification of the message is given instead.
57 If there is sufficient room left on the
60 subject, the line will be filled with text from the body, preceded by
61 \*(lq<<\*(rq, and terminated by \*(lq>>\*(rq if the body is sufficiently short.
63 actually reads each of the specified messages and parses them to extract
64 the desired fields. During parsing, appropriate error messages will be
65 produced if there are format errors in any of the messages.
69 will decode RFC-2047 (MIME) encoding in
72 will only decode these fields if your
73 terminal can natively display the character set used in the encoding.
74 You should set the MM_CHARSET environment variable to your native
75 character set, if it is not US-ASCII. See the mh-profile(5) man
76 page for details about this environment variable.
81 switch allows the user to obtain a
83 listing of a maildrop file as produced by
86 includes every message in the file (you can't scan individual messages).
91 may be used to specify the width of
92 the scan line. The default is to use the width of the terminal.
101 will consult the environment variables
105 to determine your terminal type in order
106 to find out how to clear the screen prior to exiting. If the
110 output is not directed to a terminal
111 (e.g., a pipe or a file), then
113 will send a formfeed prior
116 For example, the command:
119 (scan \-clear ; show all \-show pr \-f) | lpr
122 produces a scan listing of the current folder, followed by a formfeed,
123 followed by a formatted listing of all messages in the folder, one
125 .RB \*(lq "\-show\ pr\ \-f" \*(rq
126 will cause the messages to be
127 concatenated, separated by a one\-line header and two blank lines.
129 To override the output format used by
137 switches are used. This permits individual fields of
138 the scan listing to be extracted with ease. The string is simply a format
139 string and the file is simply a format file. See
143 In addition to the standard
147 also recognizes the following additional
153 .ta \w'Dtimenow 'u +\w'Returns 'u
154 .I Escape Returns Description
155 body string the (compressed) first part of the body
156 dtimenow date the current date
157 folder string the name of the current folder
161 If no date header is present in the message, the
166 will return values for the date of last
167 modification of the message file itself. This feature is handy for
168 scanning a draft folder, as message drafts usually aren't allowed
169 to have dates in them.
174 context prior to starting the listing,
175 so interrupting a long
177 listing preserves the new context.
179 purists hate this idea.
184 .ta \w'%etcdir%/ExtraBigFileName 'u
185 ^$HOME/.mmh/profile~^The user profile
188 .SH "PROFILE COMPONENTS"
192 .ta \w'ExtraBigProfileName 'u
193 ^Path:~^To determine the user's mail storage
194 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
195 ^Current\-Folder:~^To find the default current folder
199 inc(1), pick(1), show(1), mh\-format(5)
203 .RB ` +folder "' defaults to the current folder"
204 .RB ` msgs "' defaults to all"
205 .RB ` \-format "' defaulted as described above"
206 .RB ` \-width "' defaulted to the width of the terminal"
210 If a folder is given, it will become the current folder.
215 switch must be interpreted as a single
216 token by the shell that invokes
218 Therefore, one must usually
219 place the argument to this switch inside double\-quotes.
226 contents of the first message header
229 corresponding component name; any following headers with the same
230 component name are ignored.