awk -F ";" 'FNR==NR{a[$0]=$1;next} ($2 in a)' server.list datafile | while read line
do
echo ${line}
done
when i run the above, i get this:
1 SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net ....
instead of:
[1352267653] SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net ....
can someone help me modify the awk statement?
linux/sunos
bash
---------- Post updated at 02:30 PM ---------- Previous update was at 01:14 PM ----------
what i really wanna do is translate the epoch times on the lines.
i need something like this:
cat file | perl -pe "s/(\d+)/localtime($1)/e" | while read line
do
echo $line
done
i want the resulting lines to have the translated date and time and also the epoch time as well.
something like this:
Wed Nov 7 19:28:46 UTC 2012 [1352267653] SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net ....
notice how the translated time is shown, and is followed by epoch time?? any ideas?