Skip to content

Instantly share code, notes, and snippets.

@timabell
Created July 25, 2010 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timabell/489870 to your computer and use it in GitHub Desktop.
Save timabell/489870 to your computer and use it in GitHub Desktop.
convert new tango files to gpx files - tango2gpx
#!/bin/bash
# convert new tango files to gpx files
# relies on convert2gpx to do actual conversion http://www.tangogps.org/downloads/convert2gpx.pl
# folder layout:
# first arg - source files from tangogps logging
# second arg - output folder
input="$1"
output="$2"
for src in `cd "$input" && ls *.log | sort`;
do
# echo "looking for $output/$src.gpx"
dst="$output/$src.gpx"
if [ -f "$dst" ]
then
echo "ignoring exisiting file $src"
else
echo "processing new file $src"
./convert2gpx > "$dst" < "$input/$src"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment