[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 4

rev Command

Purpose

Reverse characters in each line of a file.

Syntax

revFile ... 

Description

The rev command copies the named files to standard output, reversing the order of characters in every line. If you do not specify a file, the rev command reads standard input.

Examples

To reverse characters in each line of a file, enter:

rev file

If the file file contains the text:

abcdefghi
123456789

then the rev command displays:

ihgfedcba
987654321

Files

/usr/bin/rev Contains the rev command.

Related Information

Input and Output Redirection Overview in AIX Version 4.3 System User's Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]