got rid of test

bp-new
alanbjohnston 5 years ago committed by GitHub
parent 0afd1bb347
commit fac2cf1068
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,14 +2,9 @@
# from https://stackoverflow.com/questions/28387230/use-gpsd-or-cgps-to-return-latitude-and-longitude-then-quit
gpspipe -w -n 5 | grep DEVICES | tail -n1|cut -d":" -f5|cut -d"," -f1 | grep ttyUSB
if [[ $(gpspipe -w -n 5 | grep DEVICES | tail -n1|cut -d":" -f5|cut -d"," -f1 | grep ttyUSB) ]]; then
x=$(gpspipe -w -n 10 |grep lon|tail -n1|cut -d":" -f9|cut -d"," -f1)
y=$(gpspipe -w -n 10 |grep lon|tail -n1|cut -d":" -f10|cut -d"," -f1)
a=$(gpspipe -w -n 10 |grep lon|tail -n1|cut -d":" -f11|cut -d"," -f1)
echo "$x $y $a"
else
echo "0 0 0"
fi
x=$(gpspipe -w -n 10 |grep lon|tail -n1|cut -d":" -f9|cut -d"," -f1)
y=$(gpspipe -w -n 10 |grep lon|tail -n1|cut -d":" -f10|cut -d"," -f1)
a=$(gpspipe -w -n 10 |grep lon|tail -n1|cut -d":" -f11|cut -d"," -f1)
echo "$x $y $a"

Loading…
Cancel
Save

Powered by TurnKey Linux.