Case-insensitive search and replace with sed

前端 未结 8 1922
暗喜
暗喜 2020-11-28 08:51

I\'m trying to use SED to extract text from a log file. I can do a search-and-replace without too much trouble:

sed \'s/foo/bar/\' mylog.txt
<
8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-28 09:39

    Another work-around for sed on Mac OS X is to install gsedfrom MacPorts or HomeBrew and then create the alias sed='gsed'.

提交回复
热议问题