Logo ng OpenStreetMap OpenStreetMap

Ipaskil When Comment
Shell script to filter gpx tracks before uploading

Hello. Thank you for sharing this script. However, doesn't the sed pipe near the
end effectively delete all lines?

If not, would this be simpler?

sed '/^.*$/d "tmpfile" >$2

Also a warning: the mktemp command is creating temporay files which are not
being cleaned up. Maybe the three uses of "tmpfile" ought to be $tmpfile
instead?