When I cat the file an example of the output format is:
ok: servername Mon May 23 00:00:00 EDT 2018
ok: servername Thu Jul 16 00:00:00 EDT 2019
When performance matters. Put this in script.awk
:
BEGIN{
m["Jan"]="01"; m["Feb"]="02"; m["Mar"]="03"; m["Apr"]="04";
m["May"]="05"; m["Jun"]="06"; m["Jul"]="07" # to be completed
}
{
print $1, $2, m[$4] "/" $5 "/" $8
}
Usage: awk -f script.awk logfile
Output:
ok: servername 05/23/2018 ok: servername 07/16/2019