jromine@buckaroo.ics.uci.edu (John Romine) (02/12/91)
wiseb@turing.cs.rpi.edu (G. Bowden Wise) writes: >It seems that if no messages are generated from the `pick` part of >the command, then it simply scans my current folder. It doesn't do this on my system. The latest release is MH 6.7.1. What version are you running? -- John Romine
jcohn@NOTE2.NSF.GOV (Jonathan Charles Cohn) (02/12/91)
>wiseb@turing.cs.rpi.edu (G. Bowden Wise) writes: >>It seems that if no messages are generated from the `pick` part of >>the command, then it simply scans my current folder. >It doesn't do this on my system. The latest release is MH 6.7.1. >What version are you running? This might be as dependent on the shell you are running as on the version of MH. I am running MH 6.7.1, and see the same type of results. If the backquoted pick fails, it should return a failure code. Some shells might still start up the command outside the backquotes while others do not. Jonathan C. Cohn +1 202 357 5936
jromine@buckaroo.ics.uci.edu (John Romine) (02/13/91)
>It seems that if no messages are generated from the `pick` part of >the command, then it simply scans my current folder. jcohn@NOTE2.NSF.GOV (Jonathan Charles Cohn) writes: >This might be as dependent on the shell you are running as on the >version of MH. I am running MH 6.7.1, and see the same type of results. This might be a bug. Pick is supposed to return the string "0", which is supposed to make scan say: scan: no messages match specification What shell are you using? Are you giving pick any command line options besides the selection criteria? -- John Romine
dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) (02/13/91)
>If the backquoted pick fails, it should return a failure >code. Some shells might still start up the command outside the >backquotes while others do not. When I use scan `pick ...` and the pick fails, the scan still executes but reports no messages. Here is what I see: % scan `pick last:20 -subject xyzzy` pick: no messages match specification scan: no messages match specification Here is what my manual says for "pick": If pick is used in a back-quoted operation, such as scan `pick -from jones` and pick fails (e.g., no messages are from "jones"), then the shell will still run the outer command (e.g., "scan"). Since no messages were matched, pick produced no output, and the argument given to the outer command as a result of backquoting pick is empty. In the case of MH programs, the outer command now acts as if the default `msg' or `msgs' should be used (e.g., "all" in the case of scan ). To prevent this unexpected behavior, if `-list' was given, and if its standard output is not a tty, then pick outputs the illegal message number "0" when it fails. This lets the outer command fail gracefully as well. Compile options for "pick" here are: version: MH 6.6 #1[UCI] (ics) of Tue May 24 15:51:53 PDT 1988 options: [BSD42] [BERK] [TTYD] [MHE] [NETWORK] [BIND] [RPATHS] [SBACKUP='"#"'] [FOLDPROT='"0700"'] [MSGPROT='"0600"'] [MHRC] [MORE='"/user/bin/less"'] [OVERHEAD] [UCI] [UK] [NEED_FCNTL] [SENDMTS] [SMTP] -- Rahul Dhesi <dhesi%cirrusl@oliveb.ATC.olivetti.com> UUCP: oliveb!cirrusl!dhesi
truesdel@nas.nasa.gov (David A. Truesdell) (02/13/91)
jcohn@NOTE2.NSF.GOV (Jonathan Charles Cohn) writes: >>wiseb@turing.cs.rpi.edu (G. Bowden Wise) writes: >>>It seems that if no messages are generated from the `pick` part of >>>the command, then it simply scans my current folder. >>It doesn't do this on my system. The latest release is MH 6.7.1. >>What version are you running? >This might be as dependent on the shell you are running as on the >version of MH. I am running MH 6.7.1, and see the same type of >results. If the backquoted pick fails, it should return a failure >code. Some shells might still start up the command outside the >backquotes while others do not. >Jonathan C. Cohn >+1 202 357 5936 No, it has to do with the list that pick returns when it finds nothing in the folder that matches the selection. MH6.6, and MH6.7 return a list containing the message number "0". Earlier versions (i.e. MH6.1) return an empty ("") list. This empty list is what causes scan to produce a full listing of the folder. -- T.T.F.N., dave truesdell (truesdel@prandtl.nas.nasa.gov) "Abandon all hope, ye who press enter here."