bash - Cross-platform getopt for a shell script -
i've found out getopt
not cross-platform (in particular freebsd , linux). best workaround issue?
use getopts
(with "s").
according bash faq 35:
unless it's version util-linux, , use advanced mode, never use getopt(1). getopt cannot handle empty arguments strings, or arguments embedded whitespace. please forget ever existed.
the posix shell (and others) offer getopts safe use instead.
Comments
Post a Comment