Skip to content

Instantly share code, notes, and snippets.

@anthonydiiorio
Last active April 13, 2020 20:44
Show Gist options
  • Save anthonydiiorio/38ed678e059a4f9ca6126faf6dd71255 to your computer and use it in GitHub Desktop.
Save anthonydiiorio/38ed678e059a4f9ca6126faf6dd71255 to your computer and use it in GitHub Desktop.
Satellite Grid Extractor for Cloudlog
#!/bin/bash
# Download QSOs from "Export Satellite Only QSOs" on the ADIF export page
# Save separate files for All and LOTW Confirmed
# Load -confirmed.log and -unconfirmed.log in GcmWin
ALLSATQSO=VE2HEW-Sat-All.adi
SATLOTW=VE2HEW-Sat-LOTW.adi
CONFIRMED=ve2hew-confirmed.log
WORKED=ve2hew-unconfirmed.log
# Search for gridsquare or vucc_grids fields
# cut out leftover >
# convert vucc_grids from csv to newline
# save only first 4 characters
grep -oPi '((?<=<gridsquare:)|(?<=<vucc_grids:)).+?(?=<)' $SATLOTW | cut -d ">" -f 2 | tr , '\n' | cut -c-4 > $CONFIRMED
grep -oPi '((?<=<gridsquare:)|(?<=<vucc_grids:)).+?(?=<)' $ALLSATQSO | cut -d ">" -f 2 | tr , '\n' | cut -c-4 > $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