1 .\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
   2 .\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
   3 .\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
   4 .\" Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
   5 .Dd Feb 9, 2021
   6 .Dt REV 1
   7 .Os
   8 .Sh NAME
   9 .Nm rev
  10 .Nd reverse the characters or lines of one or more files
  11 .Sh SYNOPSIS
  12 .Nm
  13 .Op Fl l
  14 .Oo Ar file Oc Ns ...
  15 .Sh DESCRIPTION
  16 .Sh OPTIONS
  17 .Nm
  18 copies one or more files to standard output, reversing the order of
  19 characters on every line of the file, or reversing the order of lines of the
  20 file if
  21 .Fl l
  22 is specified.
  23 The following options are supported:
  24 .Bl -tag -width Ar
  25 .It Fl l Ns \&, Fl \-line
  26 Reverse the order of the lines of the file, instead of characters.
  27 .El
  28 .Sh OPERANDS
  29 The following operands are supported:
  30 .Bl -tag -width Ar
  31 .It Ar file
  32 Specifies the name of the file to use as input.
  33 .Pp
  34 If
  35 .Ar file
  36 is not specified or is \(mi,
  37 .Nm
  38 copies from standard input starting at the current offset.
  39 .El
  40 .Sh EXIT STATUS
  41 The following exit values are returned:
  42 .Bl -tag -width Ds
  43 .It Sy 0
  44 All files copied successfully.
  45 .It Sy >0
  46 One or more files did not copy.
  47 .El
  48 .Sh INTERFACE STABILITY
  49 .Sy Committed .
  50 .Sh SEE ALSO
  51 .Xr cat 1 ,
  52 .Xr ksh93 1 ,
  53 .Xr tail 1 ,
  54 .Xr attributes 5