How do I get the last non-empty line using tail under Bash shell?
tail
For example, my_file.txt looks like this:
my_file.txt
hello
Use tac, so you dont have to read the whole file:
tac FILE |egrep -m 1 .