转载:http://blog.csdn.net/universsky/article/details/8866402 linux中grep命令的使用 grep (global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来.Unix的grep家族包 括grep.egrep和fgrep. grep命令是一种强大的文本搜索工具,它
1.linux下精确替换某个字符串 sed -i 's/\<old\>/new/g' filename.txt 2.举例: 2.1有个文件名为filename.txt,内容如下: newdalsad dsadsaold old dnw new 2.2 将精确查找到的old替换为new sed -i 's/\<old\>/new/g' filename.txt 那么替换后内容如下: newdalsad dsadsaold new dnw new