Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
2  
What operating system are you using? –  EvilChookie Oct 2 '09 at 16:06
    
Web host runs RHEL and the program that imports is on Windows 2003. –  JP Oct 2 '09 at 16:10

2 Answers 2

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
share|improve this answer

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.

share|improve this answer
    
And once again, I like ~quack's answer. +1. Nice job. :) –  JMD Oct 2 '09 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 –  quack quixote Oct 2 '09 at 16:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.