使用法: sdiff [オプション]... ファイル1 ファイル2
ファイル差分の2段組併合
-o FILE --output=FILE 対話的に操作し、出力はFILEへ。
-i --ignore-case ファイル内容の大文字小文字を同一視。
-E --ignore-tab-expansion タブ展開の差を無視。
-b --ignore-space-change 空白数の差を無視。
-W --ignore-all-space 全空白を無視。
-B --ignore-blank-lines 空白だけの行の差を無視。
-i RE --ignore-matching-lines=RE REに一致するすべての行の差を無視。
--strip-trailing-cr 入力から行末キャリッジ・リターンを削除。
-a --text すべてテキストとして処理。
-w NUM --width=NUM 行当り高々NUM (既定は130) 桁で出力。
-l --left-column 共通行は左列だけ出力。
-s --suppress-common-lines 共通行の出力を抑止。
-t --expand-tabs 出力のタブを空白に展開。
-d --minimal できるだけがんばって、小さい差分を見つける。
-H --speed-large-files 巨大なファイルに分散した変更があると仮定。
--diff-program=PROGRAM ファイルの比較にPROGRAMを使用。
-v --version バージョン情報を出力。
--help この説明を出力。
ファイルが「-」のとき、標準入力を読みます。
バグを見つけたら
Usage: sdiff [OPTION]... FILE1 FILE2
Side-by-side merge of file differences.
-o FILE --output=FILE Operate interactively, sending output to FILE.
-i --ignore-case Consider upper- and lower-case to be the same.
-E --ignore-tab-expansion Ignore changes due to tab expansion.
-b --ignore-space-change Ignore changes in the amount of white space.
-W --ignore-all-space Ignore all white space.
-B --ignore-blank-lines Ignore changes whose lines are all blank.
-I RE --ignore-matching-lines=RE Ignore changes whose lines all match RE.
--strip-trailing-cr Strip trailing carriage return on input.
-a --text Treat all files as text.
-w NUM --width=NUM Output at most NUM (default 130) columns per line.
-l --left-column Output only the left column of common lines.
-s --suppress-common-lines Do not output common lines.
-t --expand-tabs Expand tabs to spaces in output.
-d --minimal Try hard to find a smaller set of changes.
-H --speed-large-files Assume large files and many scattered small changes.
--diff-program=PROGRAM Use PROGRAM to compare files.
-v --version Output version info.
--help Output this help.
If a FILE is `-', read standard input.
Report bugs to
SDIFF(1) SDIFF(1)
名前
sdiff - 2 つのファイルの違いを見つけ、対話的にマージを行う
書式
sdiff [-abdilstBEHW] [-o OUTFILE] [-w COLUMNS] [-I REGEXP] [--diff-pro-
gram=PROGRAM] [--expand-tabs] [-ignore-all-space] [-ignore-blank-lines]
[--ignore-case] [--ignore-matching-lines=REGEXP]
[--ignore-space-change] [--ignore-tab-expansion] [--left-column]
[--minimal] [--output=OUTFILE] [--speed-large-files] [--strip-trail-
ing-cr] [--supress-common-lines] [--text] [--width=COLUMNS] FROMFILE
TOFILE
sdiff [-v] [--help] [--version]
説明
sdiff は 2 つのファイルを対話的にマージする。 -o で指定されていれば結果
は OUTFILE に出力される。それ以外の場合は side-by-side 形式で違いを生成
する。
FROMFILE が ディレクトリで TOFILE がディレクトリでない場合、 sdiff は
FROMFILE にある、ファイル名が TOFILE と同じものを比較の対象にする (逆も
同じ)。 FROMFILE と TOFILE の両方にディレクトリを指定することはできない
。入力ファイルに ‘-’ を用いることはできない。 [訳注: 多くのコマンドでは
‘-’ は標準入力の意味になる]
通常 sdiff は diff を呼び出して処理を行う。しかし DIFF 環境変数を他のプ
ログラムに設定すれば、そのプログラムを使うように変更できる。また EDITOR
環境変数を設定すると、使用するエディタも変更できる。
オプション
-a, --text
テキストのように見えないファイルがあっても、全てのファイルをテキ
ストとみなして 1 行ずつ比較していく。
-b, --ignore-space-change
空白の数の違いを無視する。
-d, --minimal
アルゴリズムを変更する (おそらく小さな違いも見付かるようにな る)
。これを用いると sdiff は遅くなる (時には非常に遅くなる)。
-i, --ignore-case
英大文字と小文字の違いを無視する。
-l, --left-column
共通の行に対しては、左側の列だけを表示する。
-o OUTFILE, --output=OUTFILE
マ ージされた出力を OUTFILE に書き込む。マージを行うためにはこの
オプションが必要である。
-s, --suppress-common-lines
共通な行を表示しない。
-t, --expand-tabs
出力でタブ文字をスペースに変換する。入力ファイルでのタブ文字によ
る桁揃えが保存される。
-w COLUMNS, --width=COLUMNS
出力の幅を COLUMNS 桁にする。歴史的な理由から、 diff(1) ではこの
オプションは -W になっていることに注意。
-B, --ignore-blank-lines
空行を挿入・削除するだけの違いは無視する。
-E, --ignore-tab-expansion
タブ展開によるスペースの変更を無視する。
-H, --speed-large-files
小さな変更が大量にあるような大きなファイルを高速に扱うために、発
見的推測手法を用いる。
-I REGEXP, --ignore-matching-lines=REGEXP
正規表現 REGEXP にマッチした行を挿入・削除するだけの違いは無視す
る。
-W 行の比較の際に空白を無視する。歴史的な理由から、 diff(1) では こ
のオプションは -w になっていることに注意。
--diff-program= PROGRAM
フ ァイルの比較するために diff と互換性のある外部プログラム PRO-
GRAM を用いる。
--strip-trailing-cr
行末の CR を取り除く。行末のマーカとして CRLF を使うシステムの出
力を処理するときに役立つ。
--help 標準出力に使用方法のメッセージを出力して正常終了する。
-v, --version
sdiff のバージョン番号を出力する。
マージ
共通行のブロック (と空白の溝) は、 1 番目のファイルから出力にコピーされ
る。異なっている行ブロックのあとには、 sdiff は ‘%’ でプロンプトを出 し
て一時停止し、以下のコマンドのどれか 1 つが入力されるのを待つ。
e 両方のバージョンとも捨てる。内容が空の一時ファイルをテキストエデ
ィタで開き、エディタ終了後のファイルの内容を出力にコピーする。
eb 両方のバージョンを結合した結果をエディタで編集し、終了後の内容を
出力にコピーする。
ed ‘eb’, と似ているが、各バージョンのブロックの前にヘッダを置き、ど
のファイルのどの行のものかがわかるようにする。
el 左側のバージョンをエディタで編集し、終了後の内容を出力にコピーす
る。
er 右側のバージョンをエディタで編集し、終了後の内容を出力にコピーす
る。
l 左側のバージョンを出力にコピーする。
q 終了する。
p 右側のバージョンを出力にコピーする。
s 共通な行を表示せずにコピーする。
v 共通な行を表示しながらコピーする。デフォルト。
返り値
sdiff は以下のどれかの値で終了する:
0 sdiff は成功し、変更は存在しなかった。
1 変更が見付かった。
2 何らかのエラーが起こった。
関連項目
cmp(1), comm(1), diff(1), diff3(1)
注意
プログラムのバグについては bug-gnu-utils@gnu.org に報告してください。ペ
ージの更新は Ragnar Hojland Espinosa
SDIFF(1) User Commands SDIFF(1)
NAME
sdiff - side-by-side merge of file differences
SYNOPSIS
sdiff [OPTION]... FILE1 FILE2
DESCRIPTION
Side-by-side merge of file differences.
-o FILE --output=FILE
Operate interactively, sending output to FILE.
-i --ignore-case
Consider upper- and lower-case to be the same.
-E --ignore-tab-expansion
Ignore changes due to tab expansion.
-b --ignore-space-change
Ignore changes in the amount of white space.
-W --ignore-all-space
Ignore all white space.
-B --ignore-blank-lines
Ignore changes whose lines are all blank.
-I RE --ignore-matching-lines=RE
Ignore changes whose lines all match RE.
--strip-trailing-cr
Strip trailing carriage return on input.
-a --text
Treat all files as text.
-w NUM --width=NUM
Output at most NUM (default 130) columns per line.
-l --left-column
Output only the left column of common lines.
-s --suppress-common-lines
Do not output common lines.
-t --expand-tabs
Expand tabs to spaces in output.
-d --minimal
Try hard to find a smaller set of changes.
-H --speed-large-files
Assume large files and many scattered small changes.
--diff-program=PROGRAM
Use PROGRAM to compare files.
-v --version
Output version info.
--help Output this help.
If a FILE is ‘-’, read standard input.
AUTHOR
Written by Thomas Lord.
REPORTING BUGS
Report bugs to
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa