0
|
1 .\" @(MHWARNING)
|
|
2 .\" @(#)$Id$
|
|
3 .SC SCAN 1
|
|
4 .NA
|
|
5 scan \- produce a one line per message scan listing
|
|
6 .SY
|
|
7 scan
|
|
8 \%[+folder] \%[msgs]
|
|
9 \%[\-clear] \%[\-noclear]
|
|
10 \%[\-form\ formatfile]
|
|
11 \%[\-format\ string]
|
|
12 \%[\-header] \%[\-noheader]
|
|
13 \%[\-width\ columns]
|
|
14 \%[\-reverse] \%[\-noreverse]
|
|
15 \%[\-file filename]
|
|
16 \%[\-help]
|
|
17 .DE
|
|
18 \fIScan\fR produces a one\-line\-per\-message listing of the specified
|
|
19 messages.
|
|
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.
|
|
23 For example:
|
|
24
|
|
25 .nf
|
|
26 .in +.5i
|
|
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
|
|
32 .re
|
|
33 .in -.5i
|
|
34 .fi
|
|
35
|
|
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).
|
|
42
|
|
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.
|
|
50
|
|
51 The `\-header' switch produces a header line prior to the \fIscan\fR
|
|
52 listing.
|
|
53 Currently,
|
|
54 the name of the folder and the current date and time are output
|
|
55 (see the \fBHISTORY\fR section for more information).
|
|
56
|
|
57 If the `\-clear' switch is used and \fIscan's\fR output is directed to a
|
|
58 terminal,
|
|
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.
|
|
65
|
|
66 For example, the command:
|
|
67
|
|
68 .ti +.5i
|
|
69 (scan \-clear \-header; show all \-show pr \-f) | lpr
|
|
70
|
|
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.
|
|
75
|
|
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.
|
|
81
|
|
82 In addition to the standard \fImh\-format\fR\0(5) escapes,
|
|
83 \fIscan\fR also recognizes the following additional \fIcomponent\fR escapes:
|
|
84 .sp 1
|
|
85 .nf
|
|
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
|
|
91 .re
|
|
92 .fi
|
|
93
|
|
94 .\" and the following \fIfunction\fP escape:
|
|
95 .\" .sp 1
|
|
96 .\" .nf
|
|
97 .\" .ta \w'Dcompflagxfolderx 'u +\w'Returns 'u
|
|
98 .\" \fIEscape\fR \fIReturns\fR \fIDescription\fR
|
|
99 .\" compflag{folder} integer boolean state of `\-header'
|
|
100 .\" .re
|
|
101 .\" .fi
|
|
102 .\"
|
|
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.
|
|
108
|
|
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.
|
|
112 .Fi
|
|
113 ^$HOME/\&.mh\(ruprofile~^The user profile
|
|
114 .Pr
|
|
115 ^Path:~^To determine the user's MH directory
|
|
116 .Ps
|
|
117 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
|
|
118 .Ps
|
|
119 ^Current\-Folder:~^To find the default current folder
|
|
120 .Sa
|
|
121 inc(1), pick(1), show(1), mh\-format(5)
|
|
122 .De
|
|
123 `+folder' defaults to the folder current
|
|
124 .Ds
|
|
125 `msgs' defaults to all
|
|
126 .Ds
|
|
127 `\-format' defaulted as described above
|
|
128 .Ds
|
|
129 `\-noheader'
|
|
130 .Ds
|
|
131 `\-width' defaulted to the width of the terminal
|
|
132 .Co
|
|
133 If a folder is given, it will become the current folder.
|
|
134 .Hi
|
|
135 Prior to using the format string mechanism,
|
|
136 `\-header' used to generate a heading saying what each column in the listing
|
|
137 was.
|
|
138 Format strings prevent this from happening.
|
|
139 .Bu
|
|
140 The argument to the `\-format' switch must be interpreted as a single token
|
|
141 by the shell that invokes \fIscan\fR.
|
|
142 Therefore,
|
|
143 one must usually place the argument to this switch inside double\-quotes.
|
|
144 .br
|
|
145 The value of
|
|
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.
|
|
150 .sp
|
|
151 The switch `\-reverse', makes \fIscan\fR list the messages
|
|
152 in reverse order; this should be considered a bug.
|
|
153 .sp
|
|
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
|
|
158 with this option.
|
|
159 .En
|