使用法: comm [オプション]... ファイル1 ファイル2
Compare sorted files FILE1 and FILE2 line by line.
With no options, produce three-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2,
and column three contains lines common to both files.
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)
--check-order check that the input is correctly sorted, even
if all input lines are pairable
--nocheck-order do not check that the input is correctly sorted
--output-delimiter=STR separate columns with STR
--help この使い方を表示して終了
--version バージョン情報を表示して終了
Note, comparisons honor the rules specified by `LC_COLLATE'.
Examples:
comm -12 file1 file2 Print only lines present in both file1 and file2.
comm -3 file1 file2 Print lines in file1 not in file2, and vice versa.
Report comm bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: comm [OPTION]... FILE1 FILE2
Compare sorted files FILE1 and FILE2 line by line.
With no options, produce three-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2,
and column three contains lines common to both files.
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)
--check-order check that the input is correctly sorted, even
if all input lines are pairable
--nocheck-order do not check that the input is correctly sorted
--output-delimiter=STR separate columns with STR
--help display this help and exit
--version output version information and exit
Note, comparisons honor the rules specified by `LC_COLLATE'.
Examples:
comm -12 file1 file2 Print only lines present in both file1 and file2.
comm -3 file1 file2 Print lines in file1 not in file2, and vice versa.
Report comm bugs to bug-coreutils@gnu.org
GNU coreutils home page:
COMM(1) COMM(1)
名前
comm - ソート済みの2つのファイルを行ごとに比較する
書式
comm [-123] FILE1 [FILE2]
comm [--help] [--version]
説明
comm は二つの入力ファイルを読み込み、共通な行および共通でない行をそれぞ
れ表示する。一方の FILE が省略されると、その分は標準入力から読み込む 。
また FILE が ‘-’ だった場合には、そのファイルには標準入力が用いられる。
オプションが与えられない場合、 comm は 3 列からなる出力を生成する。第 1
列には FILE1 だけにしか含まれない行を、第 2 列には FILE2 だけにしか含ま
れない行を、そして第 3 列には両方のファイルに共通に含まれている行をそれ
ぞれ出力する。列は
COMM(1) User Commands COMM(1)
NAME
comm - compare two sorted files line by line
SYNOPSIS
comm [OPTION]... FILE1 FILE2
DESCRIPTION
Compare sorted files FILE1 and FILE2 line by line.
With no options, produce three-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2, and
column three contains lines common to both files.
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)
--check-order
check that the input is correctly sorted, even if all input
lines are pairable
--nocheck-order
do not check that the input is correctly sorted
--output-delimiter=STR
separate columns with STR
--help display this help and exit
--version
output version information and exit
Note, comparisons honor the rules specified by ‘LC_COLLATE’.
EXAMPLES
comm -12 file1 file2
Print only lines present in both file1 and file2.
comm -3
file1 file2 Print lines in file1 not in file2, and vice versa.
AUTHOR
Written by Richard M. Stallman and David MacKenzie.
REPORTING BUGS
Report comm bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa