ワンライナーのことか。
awk使いたいだけなら、
cat file1 | cat -n | tail -1 | awk '{print $1}'
でいいじゃん。