pi-scripts
pi-scripts copied to clipboard
Fix #21 Minor bug in Call Sign Lookup
Tested with AC1EO and KM4ACK.
https://www.unix.com/shell-programming-and-scripting/164205-awk-print-all-fields-except-last-field.html#award302542665
NAME=$(cat $FILE | head -1 | sed 's/<B>//' | sed 's/<br>//' | awk 'sub(", " $NF, "")')
https://stackoverflow.com/a/17921589
CALL=$(cat $FILE | head -1 | sed 's/<B>//' | sed 's/<br>//' | awk -F ", " '{print $NF}')
I admit I don't fully understand the awk, but it works.