summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/rev.1
blob: 3bc23eb1a9121be42c2ee2e9a29dfe205de80219 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
'\" te
.\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.TH rev 1 "11 Aug 2009" "SunOS 5.11" "User Commands"
.SH NAME
rev \- reverse the characters or lines of one or more files
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/rev\fR [\fB-l\fR] [\fIfile\fR...]
.fi

.SS "ksh93"
.LP
.nf
rev [-\fBl\fR] [\fIfile\fR...]
.fi

.SH DESCRIPTION
.sp
.LP
\fBrev\fR copies one or more files to standard output, reversing the order of
characters on every line of the file, or reversing the order of lines of the
file if \fB-l\fR is specified
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.mk
.na
\fB\fB-l\fR\fR
.ad
.br
.na
\fB\fB--line\fR\fR
.ad
.RS 10n
.rt  
Reverse the order of the lines of the file, instead of characters.
.RE

.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.mk
.na
\fB\fIfile\fR\fR
.ad
.RS 8n
.rt  
Specifies the name of the file to use as input.
.sp
If \fIfile\fR is not specified, or if \fIfile\fR is a \fB-\fR, \fBrev\fR copies
from standard input starting at the current offset.
.RE

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.mk
.na
\fB\fB0\fR\fR
.ad
.RS 6n
.rt  
All files copied successfully.
.RE

.sp
.ne 2
.mk
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
.rt  
One or more files did not copy.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
CSIEnabled
_
Interface StabilityCommitted
.TE

.SH SEE ALSO
.sp
.LP
\fBcat\fR(1), \fBksh93\fR(1), \fBtail\fR(1), \fBattributes\fR(5)