Skip to content

MacOS Support

MacOS sed doesn't support -r

sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

Possible fixes:

  1. Detect macOS with uname and then run gsed instead of sed. (Mac gsed is identical to "normal" sed.)
  2. Figure out how to run the sed command without -r