小编Mus*_*ssa的帖子

Grep for windows

Old.txt 包含

apple
orange
banana
Run Code Online (Sandbox Code Playgroud)

New.txt包含

apple
orange
banana
grape
lemon
Run Code Online (Sandbox Code Playgroud)

我可以访问添加到New.txtusing grep命令的新内容.

grep -Fxvf Old.txt New.txt > difference.txt 
Run Code Online (Sandbox Code Playgroud)

现在,difference.txt包含

grape
lemon
Run Code Online (Sandbox Code Playgroud)

在Windows中,我试过了

findstr /rvc:Old.txt New.txt > difference.txt 
Run Code Online (Sandbox Code Playgroud)

找到差异,但它也附加了内容Old.txt.如何在Windows中编写等效命令?

grep cmd findstr

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

cmd ×1

findstr ×1

grep ×1