How do I do a one way diff in Linux?

后端 未结 3 1622
渐次进展
渐次进展 2021-01-13 00:54

How do I do a one way diff in Linux?

Normal behavior of diff:

Normally, diff will tell you all the differences between a two files. For e

3条回答
  •  梦谈多话
    2021-01-13 01:24

    As stated in the comments, one mostly correct answer is

    diff A B | grep '^<'
    

    although this would give the output

    < good dog
    < two
    

    rather than

    2c2
    < good dog
    4c4,5
    < two
    

提交回复
热议问题