[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Redirecting stdout from within a Ruby script.
From:       "David Douthitt" <ddouthitt () cuna ! coop>
Date:       2004-01-29 18:30:54
Message-ID: s018fbbf.043 () email1 ! cuna ! coop
[Download RAW message or body]

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





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic