Wednesday, August 8, 2012

How could you display the last line of a file in UNIX?

tail -1 <File Name>
or
sed '$!d' <File Name>
or
awk 'END{print $0}' <File Name>

No comments :