Last active
November 25, 2019 20:02
-
-
Save anthonydiiorio/35b65df2c04fc5a7efce9d88ec257584 to your computer and use it in GitHub Desktop.
Satellite Grid Extractor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ADIF=VE2HEW.adi | |
SATS=sats.adi | |
ADIFCONF=sats-confirmed.adi | |
ADIFUNCONF=sats-unconfirmed.adi | |
WORKED=ve2hew-unconfirmed.log | |
CONFIRMED=ve2hew-confirmed.log | |
head -n 7 $ADIF | tee $SATS $ADIFCONF $ADIFUNCONF >/dev/null | |
grep '<PROP_MODE:3>SAT' $ADIF > $SATS | |
grep '<QSL_RCVD:1>[YV]\|<LOTW_QSL_RCVD:1>[YV]' $SATS > $ADIFCONF | |
grep '<QSL_RCVD:1>[RNI]\|<LOTW_QSL_RCVD:1>[RNI]' $SATS > $ADIFUNCONF | |
grep -oP '(?<=<GRIDSQUARE:[46]>).{0,4}' $ADIFCONF > $CONFIRMED | |
grep -oP '(?<=<GRIDSQUARE:[46]>).{0,4}' $ADIFUNCONF > $WORKED | |
sort -u $CONFIRMED -o $CONFIRMED | |
sort -u $WORKED -o $WORKED | |
comm -23 $WORKED $CONFIRMED > $WORKED.tmp | |
mv $WORKED.tmp $WORKED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment