0

I'm quite new to Mac OS but I've already noticed that many tools are not what I used to be. For e.g.,

  • sed missed the -w option, and
  • xargs missed the -i option, etc

I'm wondering if it has always been this case, or there are ways to get my familiar Linux/GNU tool set behaviour back in MacOS.

xpt
  • 8,261
  • 38
  • 102
  • 156
  • 1
    Pet peeve: macOS command-line utilities *are* standard (they conform to the POSIX specification), they just don't have a lot of GNU extensions that you're used to. You can install GNU versions of utilities [with Homebrew or MacPorts](https://apple.stackexchange.com/questions/69223/how-to-replace-mac-os-x-utilities-with-gnu-core-utilities), but be aware they may be missing some macOS extensions. – Gordon Davisson Jan 23 '21 at 17:36
  • 1
    Despite what Mac enthusiasts will tell you, BSD (which mac is based on) and other *NIXs are not the same creature. The command line for basic tools (like SED) also differ making scripting for both a PITA. I addition to this, the Mac tools are VERY OLD. You can use [HomeBrew](https://brew.sh/) to get some decently modern versions of these tools. You will then need to figure out how to target the GNU versions.. but that is another question. – Señor CMasMas Jan 23 '21 at 17:36

0 Answers0