Sujet : Re: Useless Use Of Regexes
De : OFeem1987 (at) *nospam* teleworm.us (Chris Ahlstrom)
Groupes : comp.os.linux.miscDate : 28. Mar 2025, 16:42:37
Autres entêtes
Organisation : None
Message-ID : <vs6g1e$2vor8$6@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : slrn/1.0.3 (Linux)
marrgol wrote this post while blinking in Morse code:
On 2025-03-27 at 22:05 Lawrence D'Oliveiro wrote:
You could have it easier with getopt ...
>
Last I checked, getopt doesn’t do long options.
>
You should check again.
ldo@theon:~> help getopt
getopts: getopts optstring name [arg ...]
[…]
>
You're quoting help to 'getopts' shell built-in command --
you are mistaking it for 'getopt' program from util-linux.
$ man getopt_long
getopt(3) Library Functions Manual getopt(3)
NAME
getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt -
Parse command-line options
The getopt family is a pain in the ass. I wrote my own command-line parsing,
though I do not use it in legacy apps.
-- Overcoming Water overcomes the stone;Without substance it requires no opening;This is the benefit of taking no action.
Yet benefit without action,
And experience without abstraction,
Are practiced by very few.
-- Lao Tse, "Tao Te Ching"