Explanation of pick2me

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`}
        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.