aboutsummaryrefslogtreecommitdiff
path: root/ja_JP.eucJP/man/man1/cat.1
blob: d8bedb689e611f509d111aafede500c70cb79fa6 (plain) (blame)
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
112
113
114
115
116
117
118
119
.\" Copyright (c) 1989, 1990, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" the Institute of Electrical and Electronics Engineers, Inc.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)cat.1	8.3 (Berkeley) 5/2/95
.\"	%Id: cat.1,v 1.8 1998/05/13 07:16:36 charnier Exp %
.\"
.\" jpman %Id: cat.1,v 1.3 1997/08/31 14:09:30 horikawa Stab %
.\"
.Dd May 2, 1995
.Dt CAT 1
.Os BSD 3
.Sh 名称
.Nm cat
.Nd ファイルの連結、表示を行う
.Sh 書式
.Nm cat
.Op Fl benstuv
.Op Fl
.Op Ar
.Sh 解説
.Nm
はファイルを連続的に読み込み、標準出力に書き出します。
.Ar file
はコマンドラインに記述された順番で処理されます。
``-'' は標準入力を表します。
.Pp
オプションは以下のとおりです。
.Bl -tag -width width
.It Fl b
非空白行に、1 から開始する番号を付けます。
.It Fl e
表示できない文字を目に見える形で表示し (
.Fl v
オプション参照)、各行の最後に
.Pq Ql \&$
を表示します。
.It Fl n
行番号を付け加えます。行番号は 1 から始まります。
.It Fl s
連続した空行を圧縮します。連続した空行は 1 行の空行
として出力されます。
.It Fl t
表示できない文字を目に見える形で表示し (
.Fl v
オプション参照)、タブを
.Ql ^I
で表示します。
.It Fl u
出力のバッファリングを行いません。
.It Fl v
表示できない文字を目に見える形で表示します。
control-X は
.Ql ^X
、削除文字 (8進数で 0177) は
.Ql ^?
と表示されます。
.Tn ASCII
文字でないもの ( 最上位ビットが立っているもの )
は、
.Ql M-
(メタ) のあとに残りの7ビットで表されるキャラクタを
表示します。
.El
.Pp
.Nm
は実行に成功すると 0 を返し、エラーが起こると 0 より
大きな値を返します。
.Sh バグ
シェルの出力リダイレクトのメカニズムが原因で、
.Dq Li cat file1 file2 > file1
は file1 に最初に入っているデータを消去してしまいます!
.Sh 関連項目
.Xr head 1 ,
.Xr more 1 ,
.Xr pr 1 ,
.Xr tail 1 ,
.Xr vis 1
.Rs
.%A Rob Pike
.%T "UNIX Style, or cat -v Considered Harmful"
.%J "USENIX Summer Conference Proceedings"
.%D 1983
.Re
.Sh 歴史
.Nm
は Version 1 AT&T UNIX から登場しました。
.An Dennis Ritchie
がマニュアルの初版をデザインし、執筆しました。