'\" te .\" Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. .\" Copyright 1989 AT&T .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. .\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear on any product containing this material. .TH comm 1 "2011 年 7 月 26 日" "SunOS 5.11" "ユーザーコマンド" .SH 名前 comm \- 2 つのファイルに共通な行または共通でない行の表示 .SH 形式 .LP .nf \fB/usr/bin/comm\fR [\fB-\fIoptions\fR\fR] \fIfile1\fR \fIfile2\fR .fi .SH 機能説明 .sp .LP \fBcomm\fR は、現在のロケールの照合順序に従ってソートされているはずの 2 つのファイル \fIfile1\fR と \fIfile2\fR を読み込み、出力として 3 つのテキスト列を生成します。 .sp .ne 2 .mk .na \fB1\fR .ad .RS 5n .rt \fIfile1\fR の行のみ。 .RE .sp .ne 2 .mk .na \fB2\fR .ad .RS 5n .rt \fIfile2\fR の行のみ。 .RE .sp .ne 2 .mk .na \fB3\fR .ad .RS 5n .rt 両方のファイルの行。 .RE .sp .LP いずれかのファイルの行が現在のロケールの照合順序に従ってソートされていない場合、結果は不確定です。 .sp .LP \fIfile1\fR または \fIfile2\fR が \fB-\fR の場合、\fBcomm\fR は標準入力を使用します。開始位置は現在の位置です。 .SH オプション .sp .LP サポートしているオプションは、次のとおりです。 .sp .ne 2 .mk .na \fB\fB-1\fR\fR .ad .RS 6n .rt \fIfile1\fR だけに存在している行の出力を抑制します。 .RE .sp .ne 2 .mk .na \fB\fB-2\fR\fR .ad .RS 6n .rt \fIfile2\fR だけに存在している行の出力を抑制します。 .RE .sp .ne 2 .mk .na \fB\fB-3\fR\fR .ad .RS 6n .rt \fIfile1\fR と \fIfile2\fR の両方に存在している行の出力を抑制します。 .RE .SH オペランド .sp .LP 次のオペランドがサポートされています。 .sp .ne 2 .mk .na \fB\fIfile1\fR\fR .ad .RS 9n .rt 比較する 1 つ目のファイルのパス名。\fIfile1\fR として \fB-\fR を指定すると、標準入力とみなされます。 .RE .sp .ne 2 .mk .na \fB\fIfile2\fR\fR .ad .RS 9n .rt 比較する 2 つ目のファイルのパス名。\fIfile2\fR として \fB-\fR を指定すると、標準入力とみなされます。 .RE .SH 使用法 .sp .LP ファイルが 2G バイト (2^31 バイト) 以上ある場合の \fBcomm\fR の動作については、\fBlargefile\fR(5) を参照してください。 .SH 使用例 .LP \fB例 1 \fRファイルによって指定された、ユーティリティーのリストを出力する .sp .LP \fIfile1\fR、\fIfile2\fR、\fIfile3\fR の 3 つのファイルに、ユーティリティーのリストが正しくソートされて書かれている場合、 .sp .in +2 .nf example% \fBcomm -23 file1 file2 | comm -23 - file3\fR .fi .in -2 .sp .sp .LP のコマンドは、\fIfile1\fR だけに含まれているユーティリティーだけを出力します。次のエントリを見てください。 .sp .in +2 .nf example% \fBcomm -12 file1 file2 | comm -12 - file3\fR .fi .in -2 .sp .sp .LP このエントリは、3 つのファイルすべてに含まれているユーティリティーを出力します。また、次のエントリを見てください。 .sp .in +2 .nf example% \fBcomm -12 file2 file3 | comm -23 -file1\fR .fi .in -2 .sp .sp .LP このエントリは、\fIfile2\fR と \fIfile3\fR には含まれているが \fIfile1\fR には含まれていないユーティリティーを出力します。 .SH 環境 .sp .LP \fBcomm\fR の実行に影響を与える次の環境変数についての詳細は、\fBenviron\fR(5) を参照してください。\fBLANG\fR、\fBLC_ALL \fR、\fBLC_COLLATE\fR、\fBLC_CTYPE\fR、\fBLC_MESSAGES\fR、および \fBNLSPATH\fR。 .SH 終了ステータス .sp .LP 次の終了ステータスが返されます。 .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt 入力ファイルはすべて、(指定されたとおりに) 正常に出力されました。 .RE .sp .ne 2 .mk .na \fB>\fB0\fR\fR .ad .RS 6n .rt エラーが発生した。 .RE .SH 属性 .sp .LP 属性についての詳細は、マニュアルページの \fBattributes\fR(5) を参照してください。 .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . 属性タイプ属性値 _ 使用条件system/core-os _ CSI有効 _ インタフェースの安定性確実 _ 標準T{ \fBstandards\fR(5) を参照してください。 T} .TE .SH 関連項目 .sp .LP \fBcmp\fR(1), \fBdiff\fR(1), , \fBsort\fR(1), \fBuniq\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)