You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, getopts is built-in, but only single letter, so it would break your existing long options. The getoptions path would mean pulling in more external stuff, but you give you more expected, standard behavior. It took me several iterations to figure out that the pod name has to come first or it just plain doesn't work.
Hand coded options parses are always a bad idea.
At least use getopts BASH built-in: https://wiki.bash-hackers.org/howto/getopts_tutorial
Or even better, getoptions: https://dev.to/ko1nksm/the-easiest-way-to-parse-arguments-using-getoptions-for-bash-and-shell-scripts-47p5
The text was updated successfully, but these errors were encountered: