Explanation of pick2me

[previous] [next] [table of contents] [index]

The Section Finding Messages to Yourself with pick2me gives an overview of this script. Here is the pick2me script (you might want to open it in a separate browser window). To install it, see the Section Programs in This Book's Archive.

The script is pretty straightforward. It's worth looking at the top of the for loop that builds a long pick expression (in the pickargs variable):

for addr in ${PICK2ME=`cat \`mhpath +\`/$defaults`}
do
    pickstr="-to '$addr' -or -cc '$addr' -or --resent-to '$addr' -or \
          --resent-cc '$addr'"
The parameter substitution (${...}) sets the addresses that the script will (eventually) search. If the PICK2ME environment variable is set, it uses those addresses. Otherwise, it opens the $defaults file (which is pick2me.addrs) located in the MH directory (`mhpath +`). The pickstr variable holds an expression that searches for the current address in several header fields; you can edit this to search different fields.

[Table of Contents] [Index] [Previous: Explanation of original] [Next: Explanation of pof]


Last change $Date: 1999/10/10 05:14:05 $

This file first appeared in the updated online edition of the book MH & nmh: Email for Users & Programmers, by Jerry Peek. Copyright © 1997 by Jerry Peek. This file is freely available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.

Suggestions are welcome: Jerry Peek <jpeek@jpeek.com>