Help for this page

Select Code to Download


  1. or download this
    open (STDOUT, "|tee /var/tmp/IQOQ.txt");
    &y_up; ##run yum update
    ...
    my $u = "update";
    
    system("$y", "$u");
    
  2. or download this
    Transaction Summary
    ======================================================================
    +==========
    Install      3 Package(s)         
    Update      67 Package(s)         
    Remove       0 Package(s)
    
  3. or download this
    Transaction Summary
    ======================================================================
    +==============================
    ...
    
    Total download size: 114 M
    Is this ok [y/N]:
    
  4. 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