sed(/usr/bin/sed) on macOS and GNU
sed are different. How to install GNU
brew install gnu-sed
GNU sed will be located in
/usr/local/bin/sed. You can use
gsed in terminal.
Or you can install GNU sed by the following command to use GNU
sed by default.
brew install gnu-sed --with-default-names