Reputation: 795
suppose this command:
FOO=bar BAR=foo executable --args
when executable
is a bash script i just get opts by names, $FOO, $BAR etc.
how to get them if executable
is a ruby script?
Upvotes: 0
Views: 81
Reputation: 230346
These "options" are environment variables and, therefore, they are available through ENV
. Try this:
puts ENV['FOO'] # => bar
Upvotes: 2