Reversing the order of lines in a file ====================================== Author: Momchil Ivanov Date : 2013.01.19 Using tail ---------- tail -r Using sed --------- # reverse order of lines (emulates "tac") # bug/feature in HHsed v1.5 causes blank lines to be deleted sed '1!G;h;$!d' # method 1 sed -n '1!G;h;$p' # method 2 Additional information ---------------------- For additional information see: http://stackoverflow.com/questions/742466/how-can-i-reverse-the-order-of-lines-in-a-file or search for "sed1line.txt".