Find the answer to your Linux question:
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 ...
  1. #1
    Linux 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??

  2. #2
    Linux Guru Rubberman's Avatar
    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!

  3. #3
    Linux 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...