Shell script to grab sorce code of webpage

Discussion in 'Programming' started by jasonsc, Dec 7, 2007.

  1. #1
    Hello,

    I need to make a script that would grab a source code of a web page and dump it in a file. What do you recommend to use (on linux).

    Thanks!!
     
    jasonsc, Dec 7, 2007 IP
  2. beejaysea

    beejaysea Peon

    Messages:
    141
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    wget or curl.
     
    beejaysea, Dec 7, 2007 IP
    jasonsc likes this.
  3. jasonsc

    jasonsc Well-Known Member

    Messages:
    1,696
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    165
    #3
    Great thanks. Rep given. This probably looks strange with the link in my sig, but that's my friends page, I am writing a shell script and I don't want to bother him for such a small thing :)

    rep given
     
    jasonsc, Dec 7, 2007 IP
  4. DonCash

    DonCash Peon

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Are you still looking for a shell script to do this?

    I can help. PM me.
     
    DonCash, Dec 10, 2007 IP
  5. Daniel15

    Daniel15 Member

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #5
    You may also use lynx, as an example:
    lynx -source http://www.daniel15.net/

    Although using wget or curl is better :)
     
    Daniel15, Dec 10, 2007 IP