このページの内容

8.3 マージ済み出力を直接生成する

--merge(-m)オプションを指定すると、diff3 はマージ済みファイルを直接出力します。ed で生成するより効率的で、ed が受け付けない非テキストファイルでも動作します。ed スクリプトのオプションなしで -m を指定すると、-A が指定されたものと見なされます。

たとえば「diff3 -m lao tzu tao」コマンド(入力ファイルは 3つ目の入力例ファイル を参照)は、次のように出力します。

<<<<<<< tzu
=======
The Way that can be told of is not the eternal Way;
The name that can be named is not the eternal name.
>>>>>>> tao
The Nameless is the origin of Heaven and Earth;
The Named is the mother of all things.
Therefore let there always be non-being,
  so we may see their subtlety,
And let there always be being,
  so we may see their result.
The two are the same,
But after they are produced,
  they have different names.
<<<<<<< lao
||||||| tzu
They both may be called deep and profound.
Deeper and more profound,
The door of all subtleties!
=======

  -- The Way of Lao-Tzu, tr. Wing-tsit Chan
>>>>>>> tao