1

I have a program that needs a text file. I have a script that runs on a web host that makes the text file. Is there any way I can map the URL to something (possibly named pipes?) that would keep me from having open up Firefox, going to the URL, saving the file as txt and then importing that file?

2
  • 2
    What operating system are you using? Oct 2, 2009 at 16:06
  • Web host runs RHEL and the program that imports is on Windows 2003.
    – JP
    Oct 2, 2009 at 16:10

2 Answers 2

1

wget is your friend. Available on most Unix/Linux systems, Cygwin environments for windows, and as a standalone Windows executable. It runs on the commandline and is very easy to script.

Download arbitrary HTTP or FTP URLs to the current directory:

$ wget http://myserver.com/path/to/mytextfile.txt
0

Most cURL use involves automating unattended file-transfers or sequences of operations. For example, it is a good tool for simulating a user's actions at a web browser.

I've not used cURL in Windows, myself, but there are certainly Windows ports available, for example via Cygwin.

2
  • And once again, I like ~quack's answer. +1. Nice job. :)
    – JMD
    Oct 2, 2009 at 16:14
  • curl is a good wget substitute. ;) j/k, actually i think curl handles more protocols, i've just been using wget too long and never remember the alternative. windows builds of curl are available here: curl.haxx.se/download.html Oct 2, 2009 at 16:50

You must log in to answer this question.