Re: mutt and stdin

2012-04-17 Thread Grant Edwards
On 2012-04-17, Luis Mochan wrote: > On Tue, Apr 17, 2012 at 01:10:43PM -0300, Andrei Mikhailov wrote: >> Thank you ! >> I think I now understand, more or less, why it does not work as expected. >> Perhaps my question is more about Linux, than about Mutt. What I really >> want to achieve is the fol

Re: mutt and stdin

2012-04-17 Thread David Champion
* On 17 Apr 2012, Derek Martin wrote: > On Tue, Apr 17, 2012 at 11:36:04AM -0500, David Champion wrote: > > TTY=$(tty); echo mymaildir | xargs -I{} sh -c "mutt -f '{}' <$TTY" > > Nice! I wasn't familiar with that usage of xargs... It even appears to be fairly portable. BSD xargs also has -o, w

Re: mutt and stdin

2012-04-17 Thread Derek Martin
On Tue, Apr 17, 2012 at 11:36:04AM -0500, David Champion wrote: > TTY=$(tty); echo mymaildir | xargs -I{} sh -c "mutt -f '{}' <$TTY" Nice! I wasn't familiar with that usage of xargs... -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted fro

Re: mutt and stdin

2012-04-17 Thread Andrei Mikhailov
Thank you, this solved my problem. I knew it was a Linux question. > TTY=$(tty); echo mymaildir | xargs -I{} sh -c "mutt -f '{}' <$TTY" > > -- > David Champion • d...@uchicago.edu • IT Services • University of Chicago

Re: mutt and stdin

2012-04-17 Thread Brian Cuttler
I'd thought he could put the data into a file and then invoke mutt, something like. mutt -s $subject_string $delivery_to_string < message_file At least this works for me when using mailx, but that is a very different utility than mutt. On Tue, Apr 17, 2012 at 11:24:10AM -0500, Luis Mochan w

Re: mutt and stdin

2012-04-17 Thread David Champion
* On 17 Apr 2012, Derek Martin wrote: > On Tue, Apr 17, 2012 at 11:46:15AM -0300, Andrei Mikhailov wrote: > > I would expect that this command: > > > > echo mymaildir | xargs mutt -f > > > > be equivalent to: > > > > mutt -f mymaildir > > > > But instead, mutt complains about ``no recipie

Re: mutt and stdin

2012-04-17 Thread Gary Johnson
On 2012-04-17, Andrei Mikhailov wrote: > Thank you ! > I think I now understand, more or less, why it does not work as expected. > Perhaps my question is more about Linux, than about Mutt. What I really > want to achieve is the following: > > echo "mydata" | myscript.sh > > where myscript.sh is

Re: mutt and stdin

2012-04-17 Thread Luis Mochan
On Tue, Apr 17, 2012 at 01:10:43PM -0300, Andrei Mikhailov wrote: > Thank you ! > I think I now understand, more or less, why it does not work as expected. > Perhaps my question is more about Linux, than about Mutt. What I really > want to achieve is the following: > > echo "mydata" | myscript.s

Re: mutt and stdin

2012-04-17 Thread Andrei Mikhailov
Thank you ! I think I now understand, more or less, why it does not work as expected. Perhaps my question is more about Linux, than about Mutt. What I really want to achieve is the following: echo "mydata" | myscript.sh where myscript.sh is the following: #!/bin/bash some-program-which-rea

Re: mutt and stdin

2012-04-17 Thread Derek Martin
On Tue, Apr 17, 2012 at 11:46:15AM -0300, Andrei Mikhailov wrote: > I would expect that this command: > > echo mymaildir | xargs mutt -f > > be equivalent to: > > mutt -f mymaildir > > But instead, mutt complains about ``no recipient specified''. > Please help me to figure this out! The p

mutt and stdin

2012-04-17 Thread Andrei Mikhailov
Dear Mutt Users, I am not sure if this is a bug of mutt, or my poor knowledge of Linux. I would expect that this command: echo mymaildir | xargs mutt -f be equivalent to: mutt -f mymaildir But instead, mutt complains about ``no recipient specified''. Please help me to figure this out! An