macOS / binaries /

rev

/usr/bin/rev
Reverse lines of a file

The rev utility copies the specified files to the standard output, reversing the order of characters in every line.

source: man