Assuming that each of these scripts are executable... how about:

--SCRIPT--
#!/usr/bin/env ruby

run_dir = "/mydir"
pages = [ "/Script1.rb", "/Script2.rb", "/Script3.rb" ]

pages.each do |curr_page|
  `#{ run_dir }#{ curr_page } >#{ curr_page }.log`
end

#run complete
--SCRIPT--

Should provide you with what you are after.. There are lots of options for ways to make this command-line driven... Look @ Usage or GetOptLong or any of the other CLI arg handling packages.

j.


On 11/25/05, Beaton, Malcolm <[EMAIL PROTECTED]> wrote:

Hi Everyone

 

OK so this is probably a little rudimentary but in order to keep my scripts separately for separate pages (Which will make maintaining them much easier) Is there a way to create a control file that basically says

 

 Go and Run /myDir/Script1.rb

When it ends

Go and run /myDir/Script2.rb

When it ends

Go And Run /myDir/Script3.rb

 

And is there a way I can log the results of each separately to files

Log <filename> 1

Log <filename> 2

Log <filename> 3

 

Any help would be appreciated (I am more a tester than a programmer so all this is a steep learning curve)

 

Malcolm Beaton

 


_____________________________________________________________________
This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified.

Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E [EMAIL PROTECTED] No. 2598884

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general





--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"

Jeff Wood
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to