Does anyone know how to call a script with a parameter?
Essentially I have a bunch of commands to run, but I only want to run
one at a time. I'm running this script from a config file. Something
like
[code]$ ruby my-script.rb param1[/code]
Does anyone know how to call a script with a parameter?
Essentially I have a bunch of commands to run, but I only want to run
one at a time. I'm running this script from a config file. Something
like
[code]$ ruby my-script.rb param1[/code]
ARGV is what you seek. This is an Array containing all your parameters.