Quantcast
Viewing latest article 23
Browse Latest Browse All 26

How can I reverse the order of lines in a file?

I'd like to reverse the order of lines in a text file (or stdin), preserving the contents of each line.

So, i.e., starting with:

foobarbaz

I'd like to end up with

bazbarfoo

Is there a standard UNIX commandline utility for this?


Viewing latest article 23
Browse Latest Browse All 26

Trending Articles