Skip to content

Instantly share code, notes, and snippets.

@alexfornuto
Created January 22, 2016 06:28
Show Gist options
  • Save alexfornuto/2fbbbd1e2658ed62bc8e to your computer and use it in GitHub Desktop.
Save alexfornuto/2fbbbd1e2658ed62bc8e to your computer and use it in GitHub Desktop.
Copy GPS info to file
#/bin/bash
MODEMNUM=$(mmcli -L | grep -oP '^\D*\d+\D*\K\d+')
#echo $MODEMNUM
sudo mmcli -m $MODEMNUM --location-enable-gps-raw --location-enable-gps-nmea
sleep 10
date >> ~/scripts/whereami.txt
mmcli -m $MODEMNUM --location-get | grep -A 3 "Raw" >> ~/scripts/whereami.txt
printf "\n \n" >> ~/scripts/whereami.tx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment