blob: 6366d8089f6f8c27175a007c945a7772b4ee577a (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/usr/bin/env zsh
(mmcli -m any --location-get;
mmcli -m any |
grep ignal |
cut -d'%' -f1) | # get location from modem manager
grep "long\|lat\|alt\|ignal" | # select only relevant lines
cut -d':' -f2 | # remove colons,
cut -d' ' -f2 | # and leading spaces
tr '\n' ',' | # csv-esque
cut -d',' -f1-4 # remove unwanted newline
|