Hello,
I am using a tail command to fetch the line before last in a log file.
the two last lines are as followed:
11-01-16 11:55:45.174 | CClientObject::InitTraceLevelInCache Starting
CClientObject::InitTraceLevelInCache End
I am doing a awk statement to gather only the numeric values:
tmp_tail=`tail -2 "$trace" | awk '{print $1$2}' | cut -f,1 -d '.' | tr -d '-' | tr -d ':'`
output:
110116115545
CClientObjectInitTraceLevelInCacheEnd
I want only the output for the line before last --> i.e. 110116115545
Please assist.