- or download this
open (STDOUT, "|tee /var/tmp/IQOQ.txt");
&y_up; ##run yum update
...
my $u = "update";
system("$y", "$u");
- or download this
Transaction Summary
======================================================================
+==========
Install 3 Package(s)
Update 67 Package(s)
Remove 0 Package(s)
- or download this
Transaction Summary
======================================================================
+==============================
...
Total download size: 114 M
Is this ok [y/N]:
- or download this
close STDOUT; #close the original STDOUT tee to file
open (STDOUT, ">/dev/tty"); #open STDOUT back to just the terminal
...
my $err = $?>> 8;
open (STDOUT, "|tee -ai /var/tmp/IQOQ.txt"); #Now re-tee STDOUT since
+ we aren't done