From: "Bob Schäfer" Date: 2008-12-10T02:18:28+09:00 Subject: Re: newbie's question: getting parameters given to hello.rb L. Maiwald wrote: > Tim Hunter wrote: > >> The arguments are in the ARGV array. ARGV[0] is the first argument, >> ARGV[1] the second, and so forth. > > thank you! additionally, sometimes it's helpful to know the number of arguments sent in with ARGV.size when my shell-style ruby scripts are dependent on arguments, i include a line at the top like this: raise 'usage: rubycat.rb file1 file2' if ARGV.size == 0