The Unix rev utility reverses lines in a file. How do I get this under Cygwin? Which package do I need to install?


The package util-linux contains rev. I found out using the Debian package search.

  • Yes, you should be able to run the Cygwin setup utility and find and install util-linux. – Zeke Hansell Mar 9 '11 at 16:05
  • 2
    More relevantly, there's the Cygwin package search at cygwin.com/packages. – ak2 Mar 9 '11 at 19:20

Use tac or sort -r from GNU coreutils.

  • rev actually reverts the letters on each line, not the lines in a file. – Sjoerd Mar 9 '11 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.