MACSCRPT Archives

March 2009

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Lively <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 19 Mar 2009 19:29:50 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
All you really need is a file with the data and then grep for the zip  
code.

The file I used was http://www.census.gov/tiger/tms/gazetteer/zcta5.txt

set zip to "66603"
do shell script "grep \"" & zip & " 5-Digit\" /Users/lively/Desktop/ 
zcta5.txt | cut -c 1,2"


On Mar 19, 2009, at 6:14 PM, Stockly, Ed wrote:

> Is it possible, from a script, to determine the state from the zip  
> code?
>
> I have a script that reads an address from a data base, but the  
> address
> doesn't contain a state. (In the past all the user's addresses were in
> California, now they are covering listings other states.)
>
> (The user is working on getting the state inserted in the data in  
> future
> builds, but until then we have hundreds of addresses that need to be  
> fixed).
>
> ES
>

ATOM RSS1 RSS2