Skip to main content
added 77 characters in body
Source Link
ilkkachu
  • 147.9k
  • 16
  • 268
  • 441

$_env is unset due to how you pass arguments to getopts.

You need to add a colon after the e to tell getopts the option takes an argument.

while getopts "p:e:" op
                  ^
              mandatory here

Check:

help getopts | less

$_env is unset due to how you pass arguments to getopts.

You need

while getopts "p:e:" op
                  ^
              mandatory here

Check:

help getopts | less

$_env is unset due to how you pass arguments to getopts.

You need to add a colon after the e to tell getopts the option takes an argument.

while getopts "p:e:" op
                  ^
              mandatory here

Check:

help getopts | less
Source Link
Gilles Quénot
  • 36.7k
  • 7
  • 74
  • 97

$_env is unset due to how you pass arguments to getopts.

You need

while getopts "p:e:" op
                  ^
              mandatory here

Check:

help getopts | less