PICK(1MH) COMMAND REFERENCE PICK(1MH) NAME pick - select mail messages by content SYNOPSIS pick [ msgs ] [ -help ] [ -src +folder ] [ -cc pattern ] [ -date pattern ] [ -from pattern ] [ -component pattern ] [ -search pattern ] [ -subject pattern ] [ -to pattern ] [ [ -file [ -link ] [ -nolink ] [ -preserve ] [ -nopreserve ] +folder ... ] ] [ [ -keep [ -stay ] [ -nostay ] [ +folder ... ] ] [ -nofile ] [ -nokeep ] [ -scan ] [ -noscan ] [ -show ] [ -noshow ] [ - stay ] [ -nostay ] DESCRIPTION The pick command searches mail messages within a folder for the specified contents, then performs operations on the selected messages. A modified grep(1) is used to perform the searching, so the full regular expression (see ed(1)) facility is available within 'pattern'. With -search, pattern is used directly, and with the others, the grep pattern constructed is: "component:.*pattern" This means that the pattern specified for a -search is found everywhere in the message, including the header and the body, while the other search requests are limited to the single specified component. The expression -component pattern is a shorthand for specifying '-search "component:.*pattern" '; it is used to pick a component not in the set [cc date from subject to]. An example is "pick -reply-to pooh -show". Searching is done on a per-line basis. Within the header of the message, each component is treated as one long line, but in the body, each line is separate. Lowercase letters in the search pattern match either lowercase or uppercase letters in the message, while uppercase letters match only uppercase letters. Once the search has been performed, the selected messages are scanned (see scan(1mh)) if the -scan switch is given, and the selected messages are shown (see show(1mh)) if the -show switch is given. After these two operations, the file operations (if requested) are performed. The -file switch operates exactly like the refile command, with the same meaning for the -preserve and -link switches. Printed 4/6/89 1
PICK(1MH) COMMAND REFERENCE PICK(1MH) The -keep switch is similar to -file, but it produces a folder that is a subfolder of the folder being searched and defines it as the current folder (unless the -stay flag is used). This subfolder contains the messages which matched the search criteria. All MH commands may be used with the subfolder as the current folder. This gives you considerable power in dealing with subsets of messages in a folder. The messages in a folder produced by -keep always have the same numbers as they have in the source folder (i.e., the -preserve switch is automatic). This way, the message numbers are consistent with the folder from which the messages were selected. Messages are not removed from the source folder (i.e., the -link switch is assumed). If +folder is not specified, the standard name select is used. (This is the meaning of select when it appears in the output of the folder command.) If +folder arguments are given to -keep, they are used rather than select for the names of the subfolders; this allows for several subfolders to be maintained concurrently. Your .mh_profile can contain the following entries: Path: To determine the user's MH directory Folder-Protect: For protection on new folders Current-Folder: To find the default current folder pick has the following defaults: -src+ folder defaults to current msgs defaults to all -keep +select is the default if no -scan, -show, or -file is specified. If a -src +folder is specified, folder becomes the current folder, unless a -keep with 0 or 1 folder arguments makes the selection-list subfolder the current folder. Each selection-list folder has its current message set to the first of the messages linked into it unless the selection list already existed, in which case the current message isn't changed. OPTIONS -cc pattern Search for the specified name in the "Cc:" line of the message header. -src +folder Search folder for the messages. -help Printed 4/6/89 2
PICK(1MH) COMMAND REFERENCE PICK(1MH) Print help information. -scan Display a scan listing of the selected messages. -noscan Don't display a scan listing of the selected messages. -date pattern Search the Date: fields of mail messages for the specified date. -show Display the selected messages. -noshow Don't display the selected messages. -nofile Opposite of -file. -nokeep Opposite of -keep. -from pattern Search the From: fields of mail messages for the specified sender. -search pattern Search the entire mail message for pattern. The other options that specify a search pattern restrict their search to the specified field of the mail message. -subject pattern Search the Subject: fields of mail messages for the specified subject. -to pattern Search the To: fields of mail messages for the specified recipient. -file Operates exactly like the refile command, with the same meaning for the -preserve and -link switches. See refile(1mh). -preserve When moving or linking a mail message to another mail folder, give the new message the same number as it had in the old folder. This option works with the -file option. -link Printed 4/6/89 3
PICK(1MH) COMMAND REFERENCE PICK(1MH) Link (don't move) the selected mail messages into another folder. This option works with the -file option. -nopreserve When moving or linking a mail message to another mail folder, give the new message a number one higher than the highest numbered message currently in the new folder. This option works with the -file option. -nolink Move (don't link) the selected mail messages into another folder. This option works with the -file option. -component pattern Search the field corresponding to component for pattern. -keep Similar to -file, but it produces a folder that is a subfolder of the folder being searched and defines the new folder as the current folder (unless you specify -stay). -stay Used with the -keep flag to prevent the newly created folder from becoming the current folder. -nostay Used with the -keep flag to make the newly created folder the current folder. This is the default for -keep. EXAMPLES The first example displays a scan listing of all mail messages from jones. pick -from jones -scan This example displays the number of messages addressed to holloway. pick -to holloway This example produces a scan listing of all the mail messages whose subject contains ned. The matching messages are moved into the subfolder select. pick -subject ned -scan -keep This example shows the power of the MH package. In item 1, the current folder is set to inbox. In 3, all messages from dcrocker are found in inbox and linked into the folder 'inbox/select'. (Since no action switch is specified, -keep is assumed.) Items 6 and 7 show that this subfolder is now Printed 4/6/89 4
PICK(1MH) COMMAND REFERENCE PICK(1MH) the current folder. Items 8 through 14 are a scan of the selected messages (note that they are all from dcrocker and are all in uppercase and lowercase letters). Item 15 lists all of the messages to the high-speed printer. Item 16 directs folder to set the current folder to the parent of the selection-list folder, which is now current. Item 17 shows that this has been done. Item 18 resets the current folder to the selection list, and 20 removes the selection- list folder and resets the current folder to the parent folder, as shown in 21 and 22. 1 $ folder +inbox 2 inbox+ has 16 messages ( 3- 22); cur= 3. 3 $ pick -from dcrocker 4 6 hits. 5 [+inbox/select now current] 6 $ folder 7 inbox/select+ has 6 messages ( 3- 16); cur= 3. 8 $ scan 9 3+ 6/20 Dcrocker Re: ned file update issue... 10 6 6/23 Dcrocker removal of files from /tm... 11 8 6/27 Dcrocker Problems with the new ned... 12 13 6/28 dcrocker newest nned <<I would ap... 13 15 7/ 5 Dcrocker nned <<Last week I asked... 14 16 7/ 5 dcrocker message id format <<I re... 15 $ show all | print 16 $ folder -up 17 inbox+ has 16 messages ( 3- 22); cur= 3; (select). 18 $ folder -down 19 inbox/select+ has 6 messages ( - 16); cur= 3. 20 $ rmf 21 [+inbox now current] 22 $ folder 23 inbox+ has 16 messages ( 3- 22); cur= 3. FILES $HOME/.mh_profile user profile SEE ALSO comp(1mh), folder(1mh), forw(1mh), inc(1mh), mail(1mh), next(1mh), pick(1mh), prev(1mh), prompter(1mh), refile(1mh), repl(1mh), rmf(1mh), rmm(1mh), scan(1mh), send(1mh), and show(1mh). Printed 4/6/89 5
%%index%% na:288,90; sy:378,2773; de:3151,2538;6049,3035; op:9084,619;10063,2668;13091,1898; ex:14989,954;16303,1627; fi:17930,128; se:18058,527; %%index%%000000000169