Hi Team ,
My file output in AIX as follows .
cat /var/log/*.osbackup.log | egrep ‘WARNING|FAIL’
08/05/18-21:30:06 WARNING: SSH does not work well …checking.
08/05/18-21:30:06 WARNING: SSH did not work correctly. Re-installing keys and testing again
08/05/18-21:30:08 FAIL: SCP or SSH test failed.
08/05/18-21:30:09 WARNING: DELETING /mksysbfs file
08/05/18-21:58:27 FAIL: Logfile was not copied .
08/05/18-21:58:27 FAIL: Logfile was not copied
Basically I want to create a analysis as follows .
-
Want to find a file under /var/log which is ending with “.osbackup.log” whether exist or not
-
if exist , I want to search whether I have any “WARNING” message or “FAIL” message inside file .
-
If I have , I want to display all lines ( WARNING and FAIL entries ) .
Can you some one assist here !!