WGET Help PLEASE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marketsmart
    HOMICIDAL TROLL KILLER
    • Dec 2004
    • 20419

    #1

    WGET Help PLEASE

    this is what i want to do: use WGET to pull a url of text every 10 minutes and write it to a file. I know how to do this part. what i dont know how to do is get it to continue to write to the file without it overwritting the original file.

    example:

    the first wget of the url would write this to a text file:

    test one
    test two

    the 2nd wget of the url would add this to the first file

    test three
    test four
    etc..

    so after the 2nd wget the file would look like this:
    test one
    test two
    test three
    test four
    etc..

    does anyone here know how to do this?

    thanks....
  • studiocritic
    Confirmed User
    • Jun 2005
    • 2442

    #2
    lynx -dump -nolinks "http://theurl" >> filetoappend
    254342256

    Comment

    • marketsmart
      HOMICIDAL TROLL KILLER
      • Dec 2004
      • 20419

      #3
      Originally posted by studiocritic
      lynx -dump -nolinks "http://theurl" >> filetoappend
      0,10,20 * * * * /usr/bin/wget lynx -dump -nolinks "http://theurl" /usr/local/apache2/file_name

      is that correct?

      Comment

      • studiocritic
        Confirmed User
        • Jun 2005
        • 2442

        #4
        Originally posted by marketsmart
        0,10,20 * * * * /usr/bin/wget lynx -dump -nolinks "http://theurl" /usr/local/apache2/file_name

        is that correct?
        yes, if you don't want it to work.

        i even bolded the important part.

        you thought bold meant ignore?
        254342256

        Comment

        • marketsmart
          HOMICIDAL TROLL KILLER
          • Dec 2004
          • 20419

          #5
          huh? i dont see a bolded part????

          Comment

          • studiocritic
            Confirmed User
            • Jun 2005
            • 2442

            #6
            Originally posted by marketsmart
            huh? i dont see a bolded part????
            then copy and paste my example, and change only the url and the filename.
            254342256

            Comment

            • marketsmart
              HOMICIDAL TROLL KILLER
              • Dec 2004
              • 20419

              #7
              ok i see.. but how do i set it up to pull that link every 10 minutes?

              Comment

              • marketsmart
                HOMICIDAL TROLL KILLER
                • Dec 2004
                • 20419

                #8
                bump for help...

                Comment

                • BigBen
                  Confirmed User
                  • Nov 2004
                  • 2299

                  #9
                  Originally posted by marketsmart
                  ok i see.. but how do i set it up to pull that link every 10 minutes?
                  Set a cron...

                  0,10,20,30,40,50 * * * * /command/to/run

                  Comment

                  • marketsmart
                    HOMICIDAL TROLL KILLER
                    • Dec 2004
                    • 20419

                    #10
                    0,10,20,30,40,50 * * * * lynx -dump -nolinks "http://theurl" /usr/local/apache2/file_name

                    is this correct?

                    Comment

                    Working...