From 63cc79ab53ebcfee19929fa0c23be959d46cc4a3 Mon Sep 17 00:00:00 2001 From: Peter Avalos Date: Sun, 4 Feb 2007 21:08:28 +0000 Subject: [PATCH] Sync with FreeBSD. --- bin/cat/cat.1 | 62 ++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/bin/cat/cat.1 b/bin/cat/cat.1 index ae80e6ff40..4bd27501c4 100644 --- a/bin/cat/cat.1 +++ b/bin/cat/cat.1 @@ -1,3 +1,4 @@ +.\"- .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -33,10 +34,10 @@ .\" SUCH DAMAGE. .\" .\" @(#)cat.1 8.3 (Berkeley) 5/2/95 -.\" $FreeBSD: src/bin/cat/cat.1,v 1.10.2.9 2001/12/14 14:22:08 ru Exp $ -.\" $DragonFly: src/bin/cat/cat.1,v 1.5 2006/02/17 19:33:30 swildner Exp $ +.\" $FreeBSD: src/bin/cat/cat.1,v 1.27 2006/12/23 09:25:23 ru Exp $ +.\" $DragonFly: src/bin/cat/cat.1,v 1.6 2007/02/04 21:08:28 pavalos Exp $ .\" -.Dd September 15, 2001 +.Dd March 21, 2004 .Dt CAT 1 .Os .Sh NAME @@ -56,7 +57,7 @@ operands are processed in command-line order. If .Ar file is a single dash -.Pq Sq \&- +.Pq Sq Fl or absent, .Nm reads from the standard input. @@ -94,9 +95,7 @@ Display non-printing characters (see the option), and display tab characters as .Ql ^I . .It Fl u -The -.Fl u -option guarantees that the output is unbuffered. +Disable output buffering. .It Fl v Display non-printing characters so they are visible. Control characters print as @@ -109,58 +108,55 @@ characters (with the high bit set) are printed as .Ql M- (for meta) followed by the character for the low 7 bits. .El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES The command: -.Bd -literal -offset indent -.Ic cat file1 -.Ed +.Pp +.Dl "cat file1" .Pp will print the contents of -.Ar file1 +.Pa file1 to the standard output. .Pp The command: -.Bd -literal -offset indent -.Ic cat file1 file2 > file3 -.Ed +.Pp +.Dl "cat file1 file2 > file3" .Pp will sequentially print the contents of -.Ar file1 +.Pa file1 and -.Ar file2 +.Pa file2 to the file -.Ar file3 , +.Pa file3 , truncating -.Ar file3 +.Pa file3 if it already exists. See the manual page for your shell (i.e., .Xr sh 1 ) for more information on redirection. .Pp The command: -.Bd -literal -offset indent -.Ic cat file1 - file2 - file3 -.Ed +.Pp +.Dl "cat file1 - file2 - file3" .Pp will print the contents of -.Ar file1 , +.Pa file1 , print data it receives from the standard input until it receives an .Dv EOF .Pq Sq ^D character, print the contents of -.Ar file2 , +.Pa file2 , read and output contents of the standard input again, then finally output the contents of -.Ar file3 . +.Pa file3 . Note that if the standard input referred to a file, the second dash on the command-line would have no effect, since the entire contents of the file would have already been read and printed by .Nm when it encountered the first -.Ql \&- +.Sq Fl operand. -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr head 1 , .Xr more 1 , @@ -200,4 +196,14 @@ It appears to have been Because of the shell language mechanism used to perform output redirection, the command .Dq Li cat file1 file2 > file1 -will cause the original data in file1 to be destroyed! +will cause the original data in +.Pa file1 +to be destroyed! +.Pp +The +.Nm +utility does not recognize multibyte characters when the +.Fl t +or +.Fl v +option is in effect. -- 2.41.0