下面的是mac上的方式
我们的需求是,把包含abc字符串的这一行,整行替换为hello
sed -i "" "s/^.*abc.*$/hello/" /Users/liuguoyan/Desktop/grep/readme.txt
下面是linux 的方式
sed -i "s/^.*abc.*$/hello/" /Users/liuguoyan/Desktop/grep/readme.txt
下面的是mac上的方式
我们的需求是,把包含abc字符串的这一行,整行替换为hello
sed -i "" "s/^.*abc.*$/hello/" /Users/liuguoyan/Desktop/grep/readme.txt
下面是linux 的方式
sed -i "s/^.*abc.*$/hello/" /Users/liuguoyan/Desktop/grep/readme.txt
微信扫一扫,分享到朋友圈
暂无评论
要发表评论,您必须先 登录