Hi

I need a Shell script that will download a text file every second from a http server using wget.

Can anyone provide me any pointers or sample scripts that will help me go about this task ???

regards

techie

Recommended Answers

All 2 Replies

give this a go (untested but it should work)

#!/usr/bin/ruby

loop do
  puts(system("wget http://...."))
  sleep 1
end

just modify the wget to suit your needs

Oops take out teh puts (i tested it in irb with system ls printing the output)

#!/usr/bin/ruby

loop do
  system("wget http://....")
  sleep 1
end
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.