100 Useful Command-Line Utilities

by Oliver; 2014

87. rev

rev reverses a string:
$ echo hello | rev
olleh
As noted in the bioinformatics wiki, we can use this trick to find the reverse complement of a string representing DNA nucleotides:
$ echo CACTTGCGGG | rev | tr ATGC TACG
CCCGCAAGTG

<PREV   NEXT>