by sgarland · 4y ago · 0 comments
sed
* The `-i` flag - In the absence of a file extension given, I should not have to specify with `''` that I want the original file over-written. The flag is called in-place for a reason.
* BSD sed doesn't support ANSI-C escape sequences, so you have to fall back to your shell quoting them for you.
xargs
* Why is there no `-d` flag for BSD?
There are others I've found over the years, but those come to mind as annoyances.
But it's a different OS. Solaris tools were different from the GNU toolset. HP-UX' tools were very different (try compiling something on HP-UX CC lol). MacOS' tools are also different.
If you expect things to be GNU, use GNU/Linux. Or Hurd :) Or install GNU coreutils.
This is a fair point, and I suppose something I just have grown used to, similar to how I can type `tar xvzf` without any `-` at all, and it works.
> MacOS' tools are also different.
Tbf when I talk of using BSD tools, I'm talking about using MacOS tools - I don't have any BSD installations, I just recognize that MacOS includes mostly (?) BSD tools by default.
I do in fact install coreutils, and either alias them or move PATH priority so they get called first.
It's not inaccurate, but somewhat unfair to use MacOS tools and call them BSD tools. They are ports of BSD tools, but Apple rarely refreshes them from the original sources, so it's kind of a time capsule to 2000. If you dropped 2000 era Linux userland on someone today, there would be a lot of complaints and concerns. On some tools, command flags added in GNU coreutils do get added to FreeBSD, although I did not check your list of specifics.
I understand why Apple doesn’t bother to contribute to upstream FreeBSD or NetBSD, but I’m curious why they aren’t eager to merge updates from them more frequently.
So for a while GNU tar didn't support automatic compression detection, and you had to manually specify 'z' or 'j' every time. Quite annoying when you are used to bsdtar, which does this for you.
That said, this is why I’ve always given up on BSD every time I’ve tried it—all of the low-level technical benefits touted in the article never actually make a difference in my day-to-day usage, whereas little annoyances with the userspace really add up.
What's the reason? Surprisingly, the file is never edited in place.