summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2004-07-02 10:28:35 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2004-07-02 10:28:35 +0000
commiteff3a6c935ac0e1d80937dc6b5c13612f4c930c4 (patch)
tree3b3491e54e6b09a23775ec725ab3f47e2bd959d5
parent2f4b2ec33f3ea470a851099e7b35326b198fe6e9 (diff)
- note that as well as tabs, the -v option does not display EOLs
from lkadosh at math dot ucr dot edu, via nick@ - put options in standard order - put explanations of examples before the examples, and indent examples - one i.e. -> e.g. as required additions/corrections/oks otto@ tom@ millert@
-rw-r--r--bin/cat/cat.157
1 files changed, 29 insertions, 28 deletions
diff --git a/bin/cat/cat.1 b/bin/cat/cat.1
index ac282346928..1073420b5bf 100644
--- a/bin/cat/cat.1
+++ b/bin/cat/cat.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cat.1,v 1.24 2003/06/02 23:32:06 millert Exp $
+.\" $OpenBSD: cat.1,v 1.25 2004/07/02 10:28:34 jmc Exp $
.\" $NetBSD: cat.1,v 1.12 1995/09/27 05:38:55 cgd Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
@@ -60,58 +60,57 @@ reads from the standard input.
.Pp
The options are as follows:
.Bl -tag -width Ds
-.It Fl n
-Number the output lines, starting at 1.
.It Fl b
Implies the
.Fl n
option but doesn't count blank lines.
-.It Fl v
-Displays non-printing characters so they are visible.
-Control characters print as
-.Ql ^X
-for control-X.
-The only exception is the tab character, control-I (see the
-.Fl t
-option).
-The
-.Tn DEL
-character (octal 0177) prints as
-.Ql ^? .
-.Pf Non- Ns Tn ASCII
-characters (with the high bit set) are printed as
-.Ql M-
-(for meta) followed by the character for the low 7 bits.
.It Fl e
Implies the
.Fl v
option and also prints a dollar sign
.Pq Ql \&$
at the end of each line.
+.It Fl n
+Number the output lines, starting at 1.
+.It Fl s
+Squeeze multiple adjacent empty lines, causing the output to be
+single spaced.
.It Fl t
Implies the
.Fl v
option and also prints tab characters as
.Ql ^I .
-.It Fl s
-Squeeze multiple adjacent empty lines, causing the output to be
-single spaced.
.It Fl u
The output is guaranteed to be unbuffered (see
.Xr setbuf 3 ) .
+.It Fl v
+Displays non-printing characters so they are visible.
+Control characters print as
+.Ql ^X
+for control-X, with the exception of the tab and EOL characters,
+which are displayed normally.
+The tab character, control-I, can be made visible via the
+.Fl t
+option.
+The
+.Tn DEL
+character (octal 0177) prints as
+.Ql ^? .
+.Pf Non- Ns Tn ASCII
+characters (with the high bit set) are printed as
+.Ql M-
+(for meta) followed by the character for the low 7 bits.
.El
.Pp
The
.Nm
utility exits 0 on success or >0 if an error occurred.
.Sh EXAMPLES
-.Li $ cat file1
-.Pp
Print the contents of
.Ar file1
-to the standard output.
+to the standard output:
.Pp
-.Li $ cat file1 file2 > file3
+.Dl $ cat file1
.Pp
Sequentially print the contents of
.Ar file1
@@ -122,11 +121,11 @@ to the file
truncating
.Ar file3
if it already exists.
-See the manual page for your shell (i.e.,
+See the manual page for your shell (e.g.,
.Xr sh 1 )
for more information on redirection.
.Pp
-.Li $ cat file1 - file2 - file3
+.Dl $ cat file1 file2 > file3
.Pp
Print the contents of
.Ar file1 ,
@@ -145,6 +144,8 @@ would have already been read and printed by
when it encountered the first
.Ql \&-
operand.
+.Pp
+.Dl $ cat file1 - file2 - file3
.Sh SEE ALSO
.Xr head 1 ,
.Xr less 1 ,