Reverse Lines in File

This bit of code will reverse (not flip) all the lines of a file, starting with the last line.

perl -e 'print reverse <>' < input > output

For example if your file is

a
b
c

this will convert it to

c
b
a

Follow

Get every new post delivered to your Inbox.

Join 45 other followers