0

I'm getting the Gps values after running the following commands in Raspberry Pi .

sudo gpsd /dev/ttyACM0 -F /var/run/gpsd.socket

gpsmon

How can I copy or write the gps data displayed on terminal to a text file?

oh.dae.su
  • 904
  • 1
  • 5
  • 12
sahana
  • 9
  • 1
  • My old answer might help - https://raspberrypi.stackexchange.com/questions/98840/is-my-gps-module-fried – tlfong01 Jul 25 '19 at 00:51

1 Answers1

6

Pipe the output from gpsmon into a file. (if the file exists already and is writable it will be wiped)

gpsmon > gpsmon.txt

Pipe the output from gpsmon to append to an existing file (provided file permissions allow write access)

gpsmon >> gpsmon.txt

Use 'tee' command to display on the terminal and pipe to a file at the same time. (same caveats on permissions occur - will overwrite existing file).

gpsmon | tee gpsmon.txt

Use 'tee' to display on the terminal and append to a file.

gpsmon | tee -a gpsmon.txt

All examples where 'gpsmon.txt' is the name of the file where your output will be saved. If gpsmon.txt doesn't exist it will be created.

Charemer
  • 615
  • 4
  • 11