Let’s say you want to allow a user to pass a
-v flag to turn on verbose logging in a script. Manually parsing out options passed to a script is difficult, but in this lesson, we’ll learn about
getopts which makes it easy. We'll look at the limitations of using getopts (options must be in a format like
-ab <value>) as well as the importance of shifting processed options off of the argument array.
getopt support case sensitivity? Is
-a equal to
getoptsupport case sensitivity? Is
-A? It does support case sensitivity,
-A. I updated the footnotes for this lesson (https://github.com/ccnokes/advanced-bash-automation-for-web-developers/tree/master/12-getopts) with that 👍.