From b57ae7407548ed1c3f2f84b436c67b9458b103aa Mon Sep 17 00:00:00 2001 From: KM4ACK Date: Wed, 31 Aug 2022 13:45:16 -0500 Subject: [PATCH] fix urls and add notes --- autopat-vara | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/autopat-vara b/autopat-vara index a197b7a..9648785 100755 --- a/autopat-vara +++ b/autopat-vara @@ -1,8 +1,11 @@ #!/bin/bash #script to perform auto connects to gateways -#using pat winlink -#20191015 KM4ACK +#using pat winlink and the vara modem +#20220831 KM4ACK + +#Most of this code was copied from the autopat script which does +#the same thing using the ARDOP modem. MYPATH=$HOME/patmenu2 LOGO=$MYPATH/pmlogo.png @@ -185,6 +188,19 @@ mkdir -p $HOME/tempardop/ #cat file, remove first few lines, remove blanks > NEWFILE NAME cat $FILE | tail -n +5 | grep '[^[:blank:]]' > $HOME/tempardop/tempardop.txt +#add speed to line if not in list already +#otherwise the URL is wrong +while read -r line +do +CHECK=$(echo $line | awk '{print $6}') +if [ "$CHECK" = 500 ] || [ "$CHECK" = 2750 ]; then +echo $line >> $HOME/tempardop/temp.txt +else +echo $line | sed 's/VARA/VARA 500/' >> $HOME/tempardop/temp.txt +fi +done < $HOME/tempardop/tempardop.txt +cp $HOME/tempardop/temp.txt $HOME/tempardop/tempardop.txt + #pad with zeros while read LINE do DISTANCE=$(echo $LINE | awk '{ print $3 }' | sed -e :a -e 's/^.\{1,4\}$/0&/;ta')