in reply to Re^4: Troubleshooting question
in thread Troubleshooting question
NEW:$bkp = `db2 "list history backup all for $db " |tail -6`; open TEMP, ">$temp"; print TEMP $bkp; close TEMP; print FILE "\nBackup Information:\n"; $bkp_info = `sed -e :a -e "{$d;N;2,3ba}" -e "{P;D}" /db2/$DB2DBDFT/Mes +sages/temp.txt`; if($bkp_info =~ /Start/) { print FILE $bkp_info; }
This new code saves 4 lines and doesn't give errors and the output via the email is still the same so I have no idea what the original programmer was doing with the sed command.$bkp = `db2 "list history backup all for $db " |tail -6`; print FILE "\nBackup Information:\n"; if($bkp =~ /Start/) { print FILE $bkp; }
|
|---|