【发布时间】:2013-07-22 17:37:56
【问题描述】:
我有很多行的 txt 文件,其中大部分重复,想要更改包含“find”的每一行,在最后一个“/”上进行分隔并在其后添加“-name”。
文本文件:
find /etc/cron.*
find /etc/inet.d/*.conf
find /etc/rc*
grep root /etc/passwd
预期视图:
find /etc/ -name cron.*
find /etc/inet.d/ -name *.conf
find /etc/ -name rc*
grep root /etc/passwd
【问题讨论】:
-
您说更改包含“find”的行,但您的示例显示 grep 行也在更改?