11

getting string after date in log

view full story
linux-howto

http://www.unix.com – I need a script to search for *.LOG in a directory, output the line after the current date and yesterday's date and also output the next 5 lines after the current date and yesterday's date I have tried following commands, still no result Code: Currentdate=`date -u +"%m/%d/%y"` awk '/$Currentdate/{getline; print}' *.LOG The log has data for the whole month for which I need only the strings attached to the current date and yesterdays date Following is the log for the current day Code: 02/28/12 06:33:34 - Process(3682) User(mq) Program(amioqc) AMQ9209: Connection to host&nb (HowTos)