`
天梯梦
  • 浏览: 13630006 次
  • 性别: Icon_minigender_2
  • 来自: 洛杉矶
社区版块
存档分类
最新评论

sed 执行错误:sed: 1: “…”: Invalid command code f

 
阅读更多

运行

grep -l \'texttofind\' * | xargs sed -i 's/toreplace/replacewith/g'

 

Im getting this error when I run the above command in the terminal.

sed: 1: "forkliftDailyChecklistW ...": invalid command code f

 

解决:

 

I figured out what was wrong. I needed to add '' after the -i and before the 's/../../':

grep -l \'texttofind\' * | xargs sed -i '' 's/toreplace/replacewith/g'

 

 

原文:http://stackoverflow.com/questions/29081799/sed-1-invalid-command-code-f

转自:sed 执行错误:sed: 1: “…”: Invalid command code f

 

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics