Question for LINUX pros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • web4x
    Will everyone please review my newest site?
    • May 2002
    • 841

    #1

    Question for LINUX pros

    I have a 1GB large file on my apache server and would like to extract only the URLs out of this file.

    What's the best way to do it?
  • echo465
    Confirmed User
    • Mar 2001
    • 265

    #2
    grep http filename

    ?
    Currently Promoting: Adult Movie Club

    Comment

    • NetRodent
      Confirmed User
      • Jan 2002
      • 3985

      #3
      That would depend on the format of the file. What other data is in the file besides urls? Are the urls all properly formated or do they sometimes break to the next line?
      "Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
      --H.L. Mencken

      Comment

      • fletcher
        Confirmed User
        • Jan 2003
        • 698

        #4
        cat filename | tr '[ "<>]' '\12' | grep -e 'http\:\/\/'
        &nbsp;
        [email protected]
        ICQ: 6411138

        Comment

        Working...