What does rev do?

reverse the order of characters on every line.

▸ Explain your own rev command →

rev examples, explained

$ rev file.txt

  • revreverse the order of characters on every line
  • file.txtan argument passed to the command

$ echo hello | rev

  • echoprint text to standard output
  • helloan argument passed to the command
  • |pipe — send this command's output into the next command
  • revreverse the order of characters on every line

rev flags & options

--helpshow usage information and exit
--versionprint version information and exit

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.