|
|
Update code files in /usr/share/misc
I was bored and feeling really geeky, so I found a web site with more complete (and International) airport codes, and then wrote a one-liner to convert the web page into the correct format for /usr/share/misc/airport. In case anyone cares, here it is. I wrote it to all go on one (long) line.
sudo curl -s http://www.mapping.com/airportcodes.html | \ awk '/A00/,/9Z9/' | perl -ne '$/=";"; s# ?##g; s#\n##g; \ s#.*$##i; s###g; s#^\s+##; s#^\s*$##; \ s#\s+#:#; print "$_\n"' > /usr/share/misc/airport Of course you might want to backup your old file first, etc. Warning: this file is over 21K lines, compared to 1.9K for the file at the BSD site, and only 153 for the original OS X version of the file. It causes Code Finder to start a little slower. [robg adds: I edited this comment to restore the missing backslashes...]
Update code files in /usr/share/misc
Some of the regular expressions I used in the one-liner above got hozed in the translation when I posted this. If anyone wants the working version, I'll have to email it to them. Reach me here: sswell at yahoo.com
Should be OK now...
I edited the comment to replace the missing characters (Geeklog killed them).
Update code files in /usr/share/misc
Sorry, the code was still garbled by Geeklog. Let me try it again. Put this all on one line:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.14 seconds |
|