1

I would like to NEVER execute a method unless an environment variable is defined, and if it is it MUST be a certain value, say "DOIT". I know how to check the value of an environment variable, but I don't know how to check if it's defined and not defined by empty ("").

Thanks

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Victor
  • 173
  • 1
  • 10
  • How can I make it so that it's optionally defined. If I use "${OPTION:?}" and I run the script, it forces me to define it to something. Can I make it so my script runs normally without it defined and then i want to check when it is defined it must be a certain vaule? – Victor Mar 25 '18 at 20:24

0 Answers0