【发布时间】:2026-01-17 14:40:01
【问题描述】:
我想使用 sed 来执行此操作。我有 2 个文件:
keys.txt:
host1
host2
test.txt
host1 abc
host2 cdf
host3 abaasdf
我想使用 sed 删除 test.txt 中包含 keys.txt 中的关键字的所有行。所以 test.txt 的结果应该是
host3 abaasdf
谁能告诉我如何用 sed 做到这一点?
谢谢,
【问题讨论】:
标签: sed