#!/usr/bin/sed -nf # # Carlos J.Duarte # first line is pasted into buffer 1{ h b } # for all other lines, the buffer (which contains all previous) # is appended to current line, so, the order is being reversed # on the buffer, after that is done, store everything on the buffer # again G h # the last line (after have done the above job) get the contents # of buffer, and print it ${ g p }