Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有大量的文本文件,我有问题,我想在这个字符串 END_PAGEREFS 之后删除任何东西,并在 BEGIN_PAGEREFS 之前删除任何东西,因为我想在它们之间
谢谢
sed 可用于此:
sed -i -n '/BEGIN_PAGEREFS/,/END_PAGEREFS/p' yourfile
可以将此命令插入循环中以处理所有文件