Tom Russo wrote:
<snip>
One could go through the EN.dat file before and after sort to see
what got messed up (if anything did).  An easy quick check would be to extract
the full EN.dat file from the FCC database (manually, not through our
fcc-get script) and compare its size to the EN.dat that results from our sort.
If something busted the sizes would be different.

Y'all might think I'm a little slow, but I didn't realize there is a script to get EN.dat -- I've been downloading it in XP and the booting into Kubuntu and copying it over. Let me try the fcc-get script and see if it works OK.

Another quick check that's even quicker is to see if every line begins with
"EN|" --- as I recall, once upon a time when the sort got busted, the post-sort
file was completely off and lines were broken where they shouldn't have been.
So try this:

   grep -v '^EN' /usr/local/share/xastir/fcc/EN.dat

        Uh-oh.  That gave me the following:
[EMAIL PROTECTED]:/usr/local/share/xastir/fcc$ grep -v '^EN' /usr/local/share/xastir/fcc/EN.dat
Apt 4210|Albuquerque|NM|87111|||000|0010211639|I|||
|McGregor|TX|76657||Nathan|000|0009036617|I|||
|CINCINNATI|OH|45248|||000|0009544289|I|||
|Boulder|CO|803057072|||000|0007301898|I|||
Apt #B2|New York|NY|10002|||000|0013912043|I|||
3241 Delsea Drive|FRANKLINVILLE|NJ|08322|||000|0004022349|I|||
|Fort Worth|TX|76133|||000|0009321696|I|||
Ste. 700|Studio City|CA|91604||Richard A Rudman|000|0013722467|I|||
P.O.Box 299|CENTRAL LAKE|MI|49622|299||000|0011583341|I|||
Apt 1238|Beaverton|OR|97006|||000|0016254138|I|||
Apartment G|Mayfield|KY|42066||Michael T. Rooksberry|000|0008197873|I|||
[EMAIL PROTECTED]:/usr/local/share/xastir/fcc$


If the file has broken lines, this will print something. If all the lines begin with "EN" as they're supposed to then it will print nothing at all.

Another quick thing to check is to see if the entry you're looking for is corrupted. To do that, just use "awk" to pull out the line:

awk -F'|' '$5=="W5ROY"{print}' /usr/local/share/xastir/fcc/EN.dat
This checks to see if it can find a line with W5ROY in the appropriate call sign
field of a properly formatted line (whereas grep will just do a case-insensitive
search for the pattern *anywhere* in the file).  If you get a line:
 EN|1060361|||W5ROY|L|L00138867|Creiglow, Roy A|Roy|A|Creiglow|||||208 Merrill 
Dr|Clovis|NM|88101|||000|0003121316|I|||
then something else is wrong, but if you see anything else (or nothing at all)
then the file is corrupted.

        This one gave me what I THINK is OK --

[EMAIL PROTECTED]:/usr/local/share/xastir/fcc$ awk -F'|' '$5=="W5ROY"{print}' /usr/local/share/xastir/fcc/EN.dat EN|1060361|||W5ROY|L|L00138867|Creiglow, Roy A|Roy|A|Creiglow|||||208 Merrill Dr|Clovis|NM|88101|||000|0003121316|I|||
[EMAIL PROTECTED]:/usr/local/share/xastir/fcc$

        Thanks for the suggestions.
        Earl
--
Earl Needham KD5XB
Clovis, New Mexico DM84jk
ZUT
_______________________________________________
Xastir mailing list
[email protected]
http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir

Reply via email to