From: David Douthitt Date: 2004-01-30T03:30:54+09:00 Subject: Re: Redirecting stdout from within a Ruby script. Thanks! Yet another reason to love Ruby ;-) Sorry for top-post (sigh....). Durned mailer... David Douthitt CUNA & Affiliates UNIX Systems Administrator LPI Level 1, Linux+ ddouthitt@cuna.coop >>> nobu.nokada@softhome.net 01/28/04 18:19 PM >>> Hi, At Thu, 29 Jan 2004 09:06:41 +0900, David Douthitt wrote: > Now I want to (optionally) send the data to another program > (/bin/mail) instead of STDOUT. Can I do this > programmatically within the script? STDOUT.reopen(IO.popen("/bin/mail #{ENV['USER']}", "w")) -- Nobu Nakada