khaw@parcplace.com (Mike Khaw) (10/19/90)
1. How can I get mush to treat +/incoming/inbox as my spoolfile for all commands, e.g., "mush -s ~/mail/incoming/inbox -H", ":folder %", w/o compiling it into mush? The -s commandline option doesn't do it. 2. Is there a way to pass mush variables to an external executable invoked by a "pipe" command; e.g., if I :pipe "foo $folder $show_hdrs > /tmp/foo.out" foo gets no command line arguments, as though "pipe" doesn't do $ expansion. I've tried all kinds of variations of quoting (or not quoting, but either I haven't found the right combination or it just doesn't work at all. -- Mike Khaw ParcPlace Systems, Inc., 1550 Plymouth St., Mountain View, CA 94043 Domain=khaw@parcplace.com, UUCP=...!{uunet,sun,decwrl}!parcplace!khaw
argv@turnpike.Eng.Sun.COM (Dan Heller) (10/19/90)
In article <730@parcplace.com> khaw@parcplace.com (Mike Khaw) writes: > 1. How can I get mush to treat +/incoming/inbox as my spoolfile > for all commands, e.g., "mush -s ~/mail/incoming/inbox -H", > ":folder %", w/o compiling it into mush? The -s commandline option > doesn't do it. You can use the -m option to specify that the "spool file" is the argument to that switch. % mush -m +incoming/inbox > 2. Is there a way to pass mush variables to an external executable > invoked by a "pipe" command; e.g., if I > > :pipe "foo $folder $show_hdrs > /tmp/foo.out" > > foo gets no command line arguments, as though "pipe" doesn't do > $ expansion. I've tried all kinds of variations of quoting (or > not quoting, but either I haven't found the right combination or > it just doesn't work at all. This should work. I don't know why it doesn't. It appears from the ':' you're using that you are executing this from curses mode. Does it act differently for line mode or command mode? Actually, I shouldn't have replied to this so soon -- I'm terribly busy with other things at the moment and I can't fully test it out. -- dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.
khaw@parcplace.com (Mike Khaw) (10/21/90)
argv@turnpike.Eng.Sun.COM (Dan Heller) writes: -In article <730@parcplace.com> khaw@parcplace.com (Mike Khaw) writes: -> 1. How can I get mush to treat +/incoming/inbox as my spoolfile -> for all commands, e.g., "mush -s ~/mail/incoming/inbox -H", -> ":folder %", w/o compiling it into mush? The -s commandline option -> doesn't do it. -You can use the -m option to specify that the "spool file" is the -argument to that switch. -% mush -m +incoming/inbox Sorry, my fingers slipped. I meant to use the -m switch and kept typing -s for some odd reason. Thanks, -m works just fine. -> 2. Is there a way to pass mush variables to an external executable -> invoked by a "pipe" command; e.g., if I -> -> :pipe "foo $folder $show_hdrs > /tmp/foo.out" -> -> foo gets no command line arguments, as though "pipe" doesn't do -> $ expansion. I've tried all kinds of variations of quoting (or -> not quoting, but either I haven't found the right combination or -> it just doesn't work at all. -This should work. I don't know why it doesn't. It appears from -the ':' you're using that you are executing this from curses mode. -Does it act differently for line mode or command mode? Actually, Nope, same results when I go into line mode first and then try to execute the pipe command. -- Mike Khaw ParcPlace Systems, Inc., 1550 Plymouth St., Mountain View, CA 94043 Domain=khaw@parcplace.com, UUCP=...!{uunet,sun,decwrl}!parcplace!khaw
schaefer@ogicse.ogi.edu (Barton E. Schaefer) (10/22/90)
In article <730@parcplace.com> khaw@parcplace.com (Mike Khaw) writes: } } 2. Is there a way to pass mush variables to an external executable } invoked by a "pipe" command [...?] Script started on Sun Oct 21 18:31:40 1990 <1> mush -rN "/usr/spool/mail/schaefer" [read only]: 14 messages, 0 new, 1 unread (6:31) #12:14-0> pipe "echo $thisfolder; cat > /dev/null" /usr/spool/mail/schaefer (6:32) #12:14-0> x <2> ^D script done on Sun Oct 21 18:32:49 1990 I don't know what you're doing wrong -- try giving the "debug" command before you attempt the pipe. This will at least show you what arguments are getting passed to "pipe". -- Bart Schaefer schaefer@cse.ogi.edu