我在许多不同的目录中有数百个 [大部分不同的] 文件,它们都有相同的 5 行文本,我需要经常编辑。例子:
/home/blah.txt
/home/hello/superman.txt
/home/hello/dreams.txt
/home/55/instruct.txt
and so on...
5 行文本按顺序排列,但在所有 .txt 文件中的不同位置开始。例子:
在 /home/blah.txt 中:
line 400 this is line 1
line 401 this is line 2
line 402 this is line 3
line 403 this is line 4
line 404 this is line 5
/home/hello/superman.txt:
line 23 this is line 1
line 24 this is line 2
line 25 this is line 3
line 26 this is line 4
line 27 this is line 5
如何在所有 .txt 文件中查找和替换这 5 行文本?