|
Madhan,
Thanks for ur help
awk -v var=`cat date_file` '{ if ( $0 ~ var ) { print } }' log_file
this will get the date and search for the pattern in log file .
can u help me in this
1) search for pattern 1 in log file ( ur awk cmd will work) if it exists then
2) then search for pattren2 from the last occurance of pattern1
3) if pattern2 exists
echo "pattern2 has happened after | date_file value "
fi
Regards
Thiru
|