DEV Community

Discussion on: Passing command-line options to bash scripts

Collapse
 
zenulabidin profile image
Ali Sherief • Edited

I do admit I extracted the first example from a larger script of mine, and the second example came from the Stack Overflow link you linked.

I'll fix the problems you pointed out, thanks for letting me know about them. It's why I have the disclaimer at the end.

Regarding the --longoptions comment though, GNU getopt does have such an option. It's the version I used in the first example.