2013-05-06 93 views
2

在SunOS 5.10機器上,遞歸查找和替換文本文件中的字符串的UNIX命令是什麼?在SunOS 5.10中遞歸地查找和替換字符串

例:

我想與SIR02222的文件從我的當前目錄替換字符串SIR01111,遞歸。

+0

你用的是什麼外殼? – chb 2013-05-06 10:12:04

+0

http://theunixshell.blogspot.com/2012/12/find-and-replace-string-in-all-files.html – Vijay 2013-05-06 10:14:43

回答

1
find . -name "*.txt"|xargs perl -pi -e 's/SIR01111/SIR02222/g' 
+0

優秀的thanx Man ... – Prince 2013-05-09 04:26:42