Comment

Comment by databasher

Like @bxparks, I have a template for my bash scripts command-line parsing, but I like to stick to GNU-style options and I find that Bash's getopts command handles all these cases without trouble:

command -ffilename -f filename --file=filename -- -f is not an option

My template is at https://gist.github.com/webb/ff380b0eee96dafe1c20c2a136d85ef....

parent databasher 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton