I am new to sed and am trying to implement this answer on a mac. After some quick research I believe I have to convert the code to BSD sed. I haven't had much success looking into the BSD sed documentation and am looking for help on how to proceed.
Asked
Active
Viewed 458 times
0
-
1Sometimes it’s easier to use Homebrew to install the GNU version of a tool than to bother with syntax differences. Also note that BSD tools that use regex often use an older traditional version of regex syntax unless you pass them `-E` for extended regex. – Spiff Jan 20 '18 at 19:53
-
2Add a semi-colon after the `d` – Thor Jan 20 '18 at 19:58
-
Why don't you use `perl` in accordance to the [accepted answer](https://superuser.com/a/440032/700617)? – simlev Jun 13 '18 at 09:53
-
Or just follow @Thor's advice. No need to *convert code*. – simlev Jun 13 '18 at 10:17