in reply to equivalent to prove?
basic sytanx: $someprog | tee somefile
#file: tee.pl use strict; use warnings; $| = 1; # **** turn off output buffering ***** sub usage () { print "TEE USAGE:\n tees stdout to a file and to stdout\n". " program | tee outfile\n". " sends stdout from program to outfile\n"; exit; } my $filename = shift @ARGV; usage unless $filename; open (OUTFILE, ">>$filename") || die "Can't open OUTFILE: $!"; while (<>){ print; print OUTFILE; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: equivalent to prove?
by Marshall (Canon) on Jan 30, 2009 at 12:27 UTC | |
by jhourcle (Prior) on Jan 30, 2009 at 17:55 UTC |