Calling script with parameter

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]

···

--
Posted via http://www.ruby-forum.com/.

Mat Howard wrote:

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.

···

--
Phillip "CynicalRyan" Gawlowski
http://cynicalryan.110mb.com/

Rule of Open-Source Programming #37:

Duplicate effort is inevitable. Live with it.

Fanatastic. That worked beautifully. Thank you very much.

···

--
Posted via http://www.ruby-forum.com/.