On Wed, Jul 26, 2000 at 08:51:01PM -0400, Wes Owen wrote:
> I am trying to capture the output of:
> 
> perl -w frank > text.file
> Can't open perl script "frank": No such file or directory
> less text.file
> 
> and text.file is empty.  Instead of "Can't open perl script "frank": No 
> such file or directory" going to the file, it is outputted to the 
> screen.  Is there any way to capture the output of perl -w?  I am doing 
> this though a bash cgi script, so what prints to the screen doesn't always 
> show up on the web.

the error message is being printed to the stderr stream.  Use this
syntax instead:

perl -w frank >& test.file

BTW: This syntax is bash specific.  If you're using a csh derivative,
it works slightly differently.

-- 
Steve Borho                       Voice:  314-615-6365
Member of Technical Staff
Celox Networking Inc

Fortune of the day:
Meade's Maxim:
        Always remember that you are absolutely unique, just like everyone else.


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to