如何只在diff中添加/更改行?

Tha*_*you 4 shell diff

A.TXT

1
2
3
4
5
6
Run Code Online (Sandbox Code Playgroud)

b.txt

10
2
3
40
50
6
70
Run Code Online (Sandbox Code Playgroud)

我想对这些生成以下输出的文件运行一些命令.

10
40
50
70
Run Code Online (Sandbox Code Playgroud)

如何在两个文件上运行差异,但显示更改的行.我不希望输出周围有任何其他元数据.

我也不希望看到更改行的任何上下文.

Bri*_*fin 5

尝试

comm -1 -3 a.txt b.txt
Run Code Online (Sandbox Code Playgroud)

comm,common lines,是一个方便的命令.