From: Toby Rodwell Date: 2010-01-26T18:31:14+09:00 Subject: Pass arguments to 'require' [You will be able to tell from what follows that I'm not a programmer - please bear with me!] I wrote two scripts and, for the frequent occasions I would want to run one then the other, a third script which was just:- #!/usr/bin/ruby require '/opt/ruby/script1' require '/opt/ruby/script2' I would now like to pass arguments to the two scripts (for simplicity the same arguments in each case), andI would like to be able to do this via the third script eg require '/opt/ruby/script1 #{ARGV}' require '/opt/ruby/script2 #{ARGV}' but Ruby doesn't accept this. For now I'm using a bash script, like so: #!/bin/bash /opt/ruby/script1 $@ /opt/ruby/script2 $@ but, partly for "niceness" reasons, I would like to use Ruby instead. Any suggestions on how to do this simply? Thanks in advance. -- Posted via http://www.ruby-forum.com/.