Are Shell Script --long-options POSIX compatible?
4
votes
2
answers
678
views
In almost all POSIX specifications (e.g. ls ), there are only short options (e.g. -A , -a , etc). In common shells like Bash , long options (e.g. --all , --almost-all , etc) are very common. And it is recommended to write Shell Scripts with long options for better readability. However, is it possible that using long options makes the shell scripts cannot run on certain, may be old version shell or environment with less resources like Android ADB, yet POSIX compatible Shells?
In addition, I notice that FreeBSD man pages (e.g. ls ), most of the long options are not available. Does FreeBSD support long options? (I do not have FreeBSD for testing.)
Asked by midnite
(613 rep)
Jan 2, 2025, 04:40 PM
Last activity: Jan 7, 2025, 11:34 AM
Last activity: Jan 7, 2025, 11:34 AM