daniel@island.COM (Daniel Smith "innovation, not litigation...") (05/18/91)
Consider these two cmd's: # pick from cmd pf "pick -f \!*; pick -f \!* | set m" # echo message list that matched cmd em 'echo $m' I say "pf gumby" and see the list of headers of messages from gumby. I can then say "em" and see the list of article numbers that my search found. I would like to get this same behavior without running pick twice. I like seeing the headers scroll by as pick does its work, but (at least in mush, perhaps not in Zmail) the list of matches isn't automatically stashed anywhere, is it? My goal would be to cmd pick to something that always gives me a var to echo out, without doing the initial search twice... Daniel -- daniel@island.com Daniel Smith, Island Graphics, (415) 491 0765 x 250(w) daniel@world.std.com 4000 CivicCenterDrive SanRafael MarinCounty CA 94903 dansmith@well.sf.ca.us Fax: 491 0402 Disclaimer: Hey, I wrote it, not IG! falling/yes I'm falling/and she keeps calling/me back again - IJSaF, Beatles
rock@warp.Eng.Sun.COM (Bill Petro) (05/19/91)
daniel@island.COM (Daniel Smith "innovation, not litigation...") writes: > Consider these two cmd's: ># pick from >cmd pf "pick -f \!*; pick -f \!* | set m" ># echo message list that matched >cmd em 'echo $m' > I say "pf gumby" and see the list of headers of messages from gumby. >I can then say "em" and see the list of article numbers that my search >found. I would like to get this same behavior without running pick twice. >I like seeing the headers scroll by as pick does its work, but (at least >in mush, perhaps not in Zmail) the list of matches isn't automatically >stashed anywhere, is it? > My goal would be to cmd pick to something that always gives me >a var to echo out, without doing the initial search twice... > Daniel pick leaves it's output msg_list in an undocumented variable called $output. You could exploit that variable if you like. I do in this way: I do a pick on some subject: pick -s boffo After I've seen the list of headers, and decide I'd like to look at the content of the messages, I do this: $output | $pager I even have it bound to a keybinding, ^Xp: bind-macro '\CXp' ':$output | $pager\n' -- Bill Petro {decwrl,hplabs,ucbvax}!sun!Eng!rock "UNIX for the sake of the kingdom of heaven" Matthew 19:12
daniel@bermuda.UUCP (Daniel Smith "innovation, not litigation...") (05/21/91)
> > > Bill "Rock" Petro - System Software Marketing wrote about "Re: setting up a list from pick?": > [ schaefer@cse.ogi.edu wrote, on May 19, 8:41pm: > > Subject: Re: setting up a list from pick? > > > > It's not undocumented! > > > > output > > (Read-only string) This variable holds a message list > > representing the output of the last successful command. > > This is useful for recovering from broken pipes or to > > capture the output of a command without affecting the > > information it displays (some commands limit or > > suppress output when used in a pipeline). ... > > Well, it certainly wasn't undocumented after I blasted it all over the > newsgroup! I guess I haven't been keeping up on Reading The Fabulous > Manual :-) Well, this doesn't work: cmd pf 'pick -f \!*; set m=$output' any ideas? Daniel