This runs the program twice unnecessarily ;) Not sure if it is a big deal or not but not required
Update: umbra you mentioned that you are on windows and don't have access to tee. In such cases you can write your own tee. It is very simple.
# Program tee
#!/usr/bin/perl -w
die "Usage: tee outfile\n" unless @ARGV == 1;
open(OUT,'>', $ARGV[0]) or die $!;
shift;
while (<>) {
print OUT;
print;
}
close (OUT) or die $!;
PS: I wasn't sure how to reply back to you with code as a /msg so decided to update this thread. |