Ya that is right but I want to avoid the whole file thing. I have to do this
very often in some testing scripts and it slows down the whole test a great
deal. So I am looking for an alternative to it.

Thanks
Mayank

-----Original Message-----
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 1:47 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Redirecting STDOUT to a variable...


On Wed, 28 Nov 2001 [EMAIL PROTECTED] wrote:

> Thanks, but I need to preserve the value returned by $mycommand also. I
> guess using backticks won't allow me to do that .
> Mostly what I need to do is read from STDOUT into a variable. But I don't
> know how to do that.

Then just redirect STDOUT of the command into a file and then open the
file, like you were doing.  That's the simplest way of doing it.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
HOW YOU CAN TELL THAT IT'S GOING TO BE A ROTTEN DAY:
        #15 Your pet rock snaps at you.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to