Q:

How to print the last but one record of a file using awk?

How to print the last but one record of a file using awk?

A:

Something like:
awk '{ prev_line=this_line; this_line=$0 } END { print prev_line }' < file

Essentially, keep a record of the line before the current one, until you hit the end of the file, then print the previous line.
edit to respond to comment:
To just extract the second field in the penultimate line:
awk '{ prev_f2=this_f2; this_f2=$2 } END { print prev_f2 }' < file

