[ale] STDOUT/STDERR redirection

Glynn Black blackgr at worldnet.att.net
Wed May 6 06:40:02 EDT 1998


I'm trying to use efax and gs from a perl script. The following code works but
STDOUT and STDERR to either the console or file but not both. Is there some
way to direct both to console and file simultaneously??? The code as is sends
the output of efax to file. The ">&1" is an unsuccessful attempt to direct to
screen. Script ignores it. None of my bash reference material gives an example
to do this.


	my ($phoneno, $fax_file) = @ARGV; 

	my $the_fax = "efax -d /dev/cua3 -o1 -t " .
		"T$phoneno $fax_file.*" .
		">&1" .
		"&>/home/blackgr/jobhunt/data/fax.log";  

	system $the_fax;


Glynn Black	blackgr at worldnet.att.net






More information about the Ale mailing list