4 ms·
> bash is completely out of date on macOS I love finding and removing all the GNU/Linux-ism in my bash code when I move it from a dev host to my personal lapto
by falsedan 8y ago
> bash is completely out of date on macOS
I love finding and removing all the GNU/Linux-ism in my bash code when I move it from a dev host to my personal laptop. macOS coreutils don't have GNU longopts, surprise!
- umanwizard 8y agoIn case you didn't know: if you really need some GNU tool, you can do `brew install coreutils` (assuming you use Homebrew). The installed binaries will have their names prefixed with `g`; e.g. `gdate` instead of `date`. If something you want isn't part of coreutils, you can often install it directly; e.g. `brew install gawk` or the weirdly-named `brew install gnu-sed` (which names its installed binary `gsed`... go figure.)
- falsedan 8y agoI know this; but can I teach every potential user of my scripts this same fact through documentation I have to maintain? What if: I write the code so that documenting it is easier?