2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

diffの便利な使い方

Posted at

今回は2つのファイルで検証!

aaa
image.png

bbb
image.png

###-u###


$ `diff -u aaa bbb`
--- aaa	2018-05-31 20:33:58.375643964 +0900
+++ bbb	2018-05-31 20:34:51.719615526 +0900
@@ -1,5 +1,5 @@
 aaa
-bbb
+
 ccc
-ddd
 eee
+fff

###-c###

$ diff -c aaa bbb
*** aaa	Thu May 31 20:33:58 2018
--- bbb	Thu May 31 20:34:51 2018
***************
*** 1,5 ****
  aaa
! bbb
  ccc
- ddd
  eee
--- 1,5 ----
  aaa
!
  ccc
  eee
+ fff

個人的にはcオプション派:smile:

2
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?