Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!princeton!cs!samadams!tr From: tr@samadams.princeton.edu (Tom Reingold) Newsgroups: comp.mail.mh Subject: Re: mh and sequences Keywords: mh, sequences Message-ID: <5519@rossignol.Princeton.EDU> Date: 20 Dec 90 22:34:44 GMT References: <4eb69609.20b6d@apollo.HP.COM> Sender: news@cs.Princeton.EDU Organization: Noo Joizy -- The Cultural Mecca Lines: 61 In article <4eb69609.20b6d@apollo.HP.COM> marc@apollo.HP.COM (Marc Gibian) writes: $ [...] $ But, I keep finding a need to do a number of things that I can't $ find anyway of accomplishing without writing more shell $ scripts/functions. Before doing that, I thought I would $ ask if anyone already can do any of the following: $ $ 1. Read one message at a time forward through a sequence, rather $ than all messages in a folder. In my .mh_profile, I have an entry: pick: -seq select -list which puts "pick" sequences into a sequence called "select". So a command for your problem number 1 would be for i in `pick select` do echo -n 'message $i: ' read junk show $i done $ 2. Do 1 backwards. for in in `pick select | rev` do echo -n 'message $i: ' read junk show $i done where "rev" is a program that prints its input last line first, and so on. How to write this program "is left as an exercise for the reader" as some pedants love to say. $ 3. pick through a number of folders in a single command/script. $ $ 4. Do 1 & 2 with the results of 3. It would be nice if this were easy. In the meantime, you have to do something like for j in `folders $* -fast -recurse` do ... done $ 5. any other neat suggestions for handling this kind of message $ volume? $ [...] Change jobs. -- Tom Reingold tr@samadams.princeton.edu OR ...!princeton!samadams!tr "Warning: Do not drive with Auto-Shade in place. Remove from windshield before starting ignition."