From: Basile STARYNKEVITCH Date: 2002-12-26T15:27:54+09:00 Subject: Re: Linux sys admin >>>>> "Matthew" == Matthew Huggett writes: Matthew> Hi: I'm real new to Ruby, and I'm wondering how to call a Matthew> program like tar or gzip from a Ruby script. Where can I Matthew> find documentation for this sort of thing? http://www.rubycentral.com/ref/ http://www.ruby-lang.org/~slagell/ruby/rubyguide.html To run a command, use Kernel.system (like system(3) in C) To run a piped command use | as first char in open: open("|wc *.c") do |f| f.each do |line| line.gsub(/a+/) do |nam| puts(nam) end end end You may also use the low level Kernel.exec with Kernel.fork see also IO.popen -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet alias: basiletunesorg 8, rue de la Fa�encerie, 92340 Bourg La Reine, France