fork download
  1. #!/bin/bash
  2. geo_data='-04.7367+055.5230'
  3. GPS_latitude=$(sed 's/\(.*\)[-+].*/\1/' <<< "$geo_data")
  4. GPS_longitude=$(sed 's/.*\([-+].*\)/\1/' <<< "$geo_data")
  5. echo "GPS Latitude: ${GPS_latitude} and GPS longitude: ${GPS_longitude}"
Success #stdin #stdout 0s 4512KB
stdin
Standard input is empty
stdout
GPS Latitude: -04.7367 and GPS longitude: +055.5230