标题: 豆粑粑 macos sed -i not work [打印本页] 作者: meatball1982 时间: 2021-9-4 08:07 标题: 豆粑粑 macos sed -i not work MacOS 用的是BSD的sed.Ubuntu 用的GNU的sed.
习惯了gnu的,BSD的总有些小问题。
于是,根据下面的帖子在MacOS上安装 gnu-sed
$ which sed
/usr/bin/sed
$ brew install gnu-sed
$ brew info gnu-sed
...
GNU "sed" has been installed as "gsed".
If you need to use it as "sed", you can add a "gnubin" directory