Unfortunately, if you want your scripts to be portable to other POSIX systems you might have to use the short options, as the long ones are not standardized. You have to decide the tradeoff for yourself.
What POSIX systems in actual use (not historical Unixes) don't have the long options? macOS' BSD utilities I guess?
Use Long Options in Scripts
11–20 of 157 posts
Re: Use Long Options in Scripts
#12Unfortunately, if you want your scripts to be portable to other POSIX systems you might have to use the short options, as the long ones are not standardized. You have to decide the tradeoff for yourself.
What POSIX systems in actual use (not historical Unixes) don't have the long options? macOS' BSD utilities I guess?
Re: Use Long Options in Scripts
#13And less prone to typos
Re: Use Long Options in Scripts
#14Sadly to this day not all BSD distributions have GNU style long options. And the ones that now do only got them fairly recently. So if you want portability you have to use short options as you weep with a bottle of vodka in hand.
Re: Use Long Options in Scripts
#15> Long form options are much more self-explanatory for the reader. And less prone to typos
Re: Use Long Options in Scripts
#16Re: Use Long Options in Scripts
#17Strongly, strongly disagree. This is a GNU-ism, and needlessly verbose. What's with people refusing to use the vast amount of memory in their brains and actually learning, instead lazily going for the lowest-common-denominator approach relying on "loanwords" from English?
Re: Use Long Options in Scripts
#18Unfortunately, if you want your scripts to be portable to other POSIX systems you might have to use the short options, as the long ones are not standardized. You have to decide the tradeoff for yourself.
Re: Use Long Options in Scripts
#19Agree that long options should be used. But there is one caveat to consider: portability. Sadly to this day not all BSD distributions have GNU style long options. And the ones that now do only got them fairly recently. So if you want portability you have to use short options as you weep with a bottle of vodka in hand.
Four years in to using it at work for dev environments across mac (x86 & ARM) and various linuxes and can’t imagine going back. I also always make dev environment definitions for my open source projects, so even if people aren’t using nix, there is at least a record of what tools they will need to install to run scripts, tests, etc.