Quantcast
Viewing all articles
Browse latest Browse all 26

Answer by driver for How can I reverse the order of lines in a file?

I see lots of interesting ideas. But try my idea. Pipe your text into this:

rev | tr '\n''~' | rev | tr '~''\n'

which assumes that the character '~' is not in the file. This should work on every UNIX shell going back to 1961. Or something like that.


Viewing all articles
Browse latest Browse all 26

Trending Articles