in reply to Capturing all (and I mean all) output to a file
The standard file handles are numbered in windows as they are in UNIX. STDIN=0, STDOUT=1, STDERR=2. Try tying together STDOUT and STDERR on the command line as part of the redirection to a file. the following code illustrates the point.
Run using the command line:#! /usr/bin/perl -w # use strict; use warnings; print "Standard Out\n"; print STDERR "Standard Error\n";
myScript.pl >out.txt 2>&1
If you are working with Windows but you need to use a Unix tool then most of them have been ported. Try Unix Utils from SourceForge http://unxutils.sourceforge.net/. The tee command is available for you to use.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Capturing all (and I mean all) output to a file
by flippy (Novice) on Jan 12, 2005 at 15:57 UTC |