Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you refer to my example above, you'll find that Bash's native "getopts" handles long options just fine. It accepts short option `-`, with an argument. This handles --long-options and --long-options=with-arguments.

Feel free to use your own formatting preferences.






Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: