LoginSignup
0
0

More than 1 year has passed since last update.

diffで変更後の行だけをいい感じに出力する方法

Last updated at Posted at 2021-11-18

自分用メモです。
詳しくはmanコマンドで確認してください。

オプションを指定する(--unchanged-line-format, --old-line-format, --new-line-format)

diff --unchanged-line-format="" --old-line-format="" --new-line-format="l.%3dn: %L" FILE_1 FILE_2

得られる出力

l. 24: hoge
l. 40: hogehoge
l. 59: hogehogehoge
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0