Results 1 to 3 of 3
I am using the following to capture a page from a website. I then use shell scripting to extract the information I want from it. wget works great for this ...
- 01-13-2010 #1Linux User
- Join Date
- Mar 2008
- Posts
- 287
Getting empty output from wget
I am using the following to capture a page from a website. I then use shell scripting to extract the information I want from it. wget works great for this if I type the command from the command line. If I use it in a script the file barFILE.txt is empty.
wget $SRCLOC -O /tmp/barFIL.tmp
The content of SRCLOC is the same whether from command line or shell script. I presume that one must tell wget where to send the captured web page.
Any ideas??
- 01-13-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Well, in your text, the file name is barFILE.txt, yet in your example it it barFIL.tmp. Is it possible you are trying to read barFILE.txt but have written the data to barFILE.tmp?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-14-2010 #3Linux User
- Join Date
- Mar 2008
- Posts
- 287
Getting empty output from wget
Thanks for catching my typo. It should be barFIL.tmp in both cases (note that E should be omitted in the name) --ugH!! my excuse is overworked and tired.


Reply With Quote