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 the following: > > #!/bin/bash > some-program-which-reads-from-stdin.sh > mutt > > In other words, the script first reads the pipe and does something, > and then just calls mutt. > Somehow, beteween ``some-program-...'' and ``mutt'' I have to insert > some command, saying: > ``finished reading pipe, control is now returning to the terminal'' > Is that possible? > Is it possible to call Mutt from within scripts accepting pipe input?
Yes. You just need to connect mutt's stdin to a terminal, e.g., #!/bin/bash do-something-with-data-read-from-stdin < /dev/tty mutt your-mutt-options Regards, Gary