我有很多行的大多數行重複,想要改變每一行中包含「查找」使最後一個「/」分離和添加後它「-name」。更改每一行以捕捉斜線和單獨的
txt文件:
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
你說含有「發現」變線,但你的例子顯示了grep的行改變嗎? – ysth