Thanks for explaining.

That grep/sed difference on mac caused me issues so many times, always thought it was just Apple doing their own thing. I didn't realize it was a spec thing.

It's neither, really. OS X takes its command line utilities from BSD world, while Linux's mostly come from GNU. They're independent implementations, and GNU utilities are as a rule much more featureful than their BSD equivalents. Or much more bloated, depending on your point of view.

Both aim to conform to the POSIX, but POSIX is a very spartan spec, people routinely use non-POSIX features without realizing it.