:g/^/m0
perl -e 'print reverse <>' filename
sed '1!G;h;$!d' filename
awk '{line[NR]=$0}END{for(i=NR;i>0;i--){print line[i]}}' filename