From: Stefano Crocco Date: 2008-01-23T21:16:17+09:00 Subject: Re: Parsing HTML / following links etc Alle Wednesday 23 January 2008, Dan Cuddeford ha scritto: > Mmmm thanks for your advice. One thought - is it possible to get ruby is > run wget externally and pull into a directory and then set ruby off to > do its magic once this is done? In ruby, you can execute a command in a subshell using the system method or the backticks (`) operator. This way, you can create a ruby script which downloads what you need using wget, then goes on doing whatever you want with those files. To run the command in your original post from ruby, you'd use system 'wget http://www.digg.com -r -l 2' or `wget http://www.digg.com -r -l 2` The difference between the two methods is that system returns true or false depending on wether the command exited correctly or with an error status, while `cmd` returns the standard output of cmd (which is not displayed on screen). I hope this helps Stefano