1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to trim a long list of items

Discussion in 'General Scripting Chat' started by jaremore7, Jul 15, 2009.

  1. jaremore7

    jaremore7 Registered Member

    Joined:
    Apr 24, 2009
    Messages:
    50
    Likes Received:
    9
    Location:
    London
    Hello Guys,

    I've downloaded a very long list of US post codes.
    Its format is
    Code:
    "35","87931","NM","CABALLO",107.347113,33.013452,860,0.000568 
    "35","87932","NM","CUCHILLO",107.456536,33.370269,125,0.000083 
    "35","87933","NM","DERRY",107.284271,32.808561,118,0.000078 
    "35","87936","NM","GARFIELD",107.270409,32.755749,432,0.000285 
    "35","87937","NM","HATCH",107.159028,32.658335,2314,0.001527 
     
    I'm only interested of getting a list of the second parameter (the ZIP code) without all the other information.
    Something that should look like the following:

    Code:
    87931
    87932
    87933
    87936
    87937
    
    The list is located at http://www.census.gov/tiger/tms/gazetteer/zips.txt

    Any help would be kindly appreciated!!!
     
  2. loamigad

    loamigad Jr. VIP Jr. VIP

    Joined:
    Sep 18, 2007
    Messages:
    257
    Likes Received:
    76
    excel seperate by ,


    i checked out the list, and you will probably have to split the list a few times to do it thou :p
     
  3. loamigad

    loamigad Jr. VIP Jr. VIP

    Joined:
    Sep 18, 2007
    Messages:
    257
    Likes Received:
    76
    Mods, I couldn't edit my post so..
    Here is the zipcode list, i was bored so i fixed it for you.
    Took 2mins tops, you should really learn how to use csv, makes it easier to handle data like that

    anyways enjoy
    Code:
    http://www.mediafire.com/?sharekey=29046b8f9ff1ed93d9d5c56d04dfa8b0e04e75f6e8ebb871
    
     
    • Thanks Thanks x 1
  4. jaremore7

    jaremore7 Registered Member

    Joined:
    Apr 24, 2009
    Messages:
    50
    Likes Received:
    9
    Location:
    London
    Thank you very much for that mate. I really appreciate it. CSV is a format, isn't it? Or is it a program?
     
  5. loamigad

    loamigad Jr. VIP Jr. VIP

    Joined:
    Sep 18, 2007
    Messages:
    257
    Likes Received:
    76
    Aye it's a format. You can view it in a text editor, excel, open office etc..

    It's pretty much as following:

    Item1,Item2,Item3

    Can also use other chars to.. seperate the items (what the , does is it will be different .. "colums?" <dunno how to spell that.. :p> in excel)