On Sat, Jul 20, 2002 at 10:47:36AM +0100, Stephen Shirley wrote:
...
> It's very easy to get one program to act on the output of a second
> program: cmd1 | cmd2. But, what if you want cmd1 to act on the output of
> cmd2 as well? Hmm. Eventually, I came up with this solution:
>> mkfifo io
> cmd1 <io | cmd2 > io
...
> mine, and i is happy person once again. In case you were wondering, the
> aim of all of this was to write a shell script that could check for new
> mail on an imap server.
Doesn't answer your question, but perhaps a combination of expect and
(netcat or telnet) might have made for an easier solution?
Later
Kenn
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!