File: wc.1

package info (click to toggle)
manpages-ja 0.5.0.0.20120606-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 25,964 kB
  • sloc: perl: 161; makefile: 116
file content (94 lines) | stat: -rw-r--r-- 3,283 bytes parent folder | download | duplicates (6)
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
.\" You may copy, distribute and modify under the terms of the LDP General
.\" Public License as specified in the LICENSE file that comes with the
.\" gnumaniak distribution
.\"
.\" The author kindly requests that no comments regarding the "better"
.\" suitability or up-to-date notices of any info documentation alternative
.\" is added without contacting him first.
.\"
.\" (C) 2002 Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
.\"
.\"	GNU wc man page
.\"	man pages are NOT obsolete!
.\"	<ragnar@ragnar-hojland.com>
.\"
.\" Japanese Version Copyright (c) 2000 NAKANO Takeo all rights reserved.
.\" Translated Sun 12 Mar 2000 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
.\" Updated Wed 14 Jul 2004 by NAKANO Takeo
.\"
.TH WC 1 "7 October 2002" "GNU textutils 2.1"
.SH 名前
wc \- ファイルのバイト数・単語数・行数を表示する
.SH 書式
.B wc
.RB [ \-clmwL ]
.RB [ \-\-bytes ]
.RB [ \-\-chars ]
.RB [ \-\-lines ]
.RB [ \-\-max\-line\-length ]
.RB [ \-\-words ]
.\"nakano modified next 2 lines.
[\fIFILE\fR]...
.br
.BR wc " [" \-\-help "] [" \-\-version ]
.SH 説明
.B wc
は指定された各
.I FILE
のバイト数・空白で区切られた単語の数・行数を数える。
.I FILE
が一つも与えられないと標準入力から読み込む。また
.I FILE
.RB ` \- '
だった場合には、そのファイルには標準入力が用いられる。

デフォルトでは、
.B wc
は 3 つ全てを出力する。
オプション指定により出力する項目を指定できる。
オプションは先に指定したものを取り消すことはできない。
したがって `wc \-\-bytes \-\-words'
はバイト数と単語数の両方を出力する。

.B wc
は最後の行に各
.I FILE
のカウント数を合計して表示する。
結果は、改行数・単語数・バイト数の順に表示される。
.SH オプション
.TP
.B \-c, \-\-bytes
バイト数だけを出力する。
ロケールによっては、\fB\-\-chars\fR とは結果が異なるかもしれない。
.TP
.B \-l, \-\-lines
改行数だけを出力する。
.TP
.B \-m, \-\-chars
文字数だけを出力する。
ロケールによっては、\fB\-\-bytes\fR とは結果が異なるかもしれない。
.TP
.B \-w, \-\-words
単語数だけを出力する。
.TP	       
.B \-L, \-\-max\-line\-length
ファイル中の行の最大長だけを表示する。
一つ以上のファイルが指定された場合は、
それらのうちでの最大長を表示する (合計ではない)。
.TP
.B "\-\-help"
標準出力に使用方法のメッセージを出力して正常終了する。
.TP
.B "\-\-version"
標準出力にバージョン情報を出力して正常終了する。
.SH POSIX の注意
.B wc
は 7 桁のフィールドに右詰でカウント数を表示する。
しかし \fBPOSIX\fP は、カウントの間 (と最後のファイル名との間) には
スペース一つだけをおくように命じている。後者のフォーマットは、
環境変数 \fBPOSIXLY_CORRECT\fR を指定すると得られる。
.SH 注意
プログラムのバグについては bug-textutils@gnu.org に報告してください。
.br
このページは Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com> が作成しました。