Use sed to remove lines in gpx file
by Johng from LinuxQuestions.org on (#6ET16)
I have gpx files which have too many lines in the form:Quote:
Using sed, how can I remove every second group of lines starting with <trkpt and ending </trkpt> ?
<trkpt lon="174.97410583" lat="-41.15725708"> <ele>39.0707</ele> <time>2014-10-15T05:13:37.000Z</time> </trkpt> <trkpt lon="174.97395325" lat="-41.15744400"> <ele>37.1481</ele> <time>2014-10-15T05:13:40.000Z</time> </trkpt> <trkpt lon="174.97402954" lat="-41.15758896"> <ele>35.7061</ele> <time>2014-10-15T05:13:47.000Z</time> </trkpt> <trkpt lon="174.97409058" lat="-41.15760040"> <ele>36.1868</ele> <time>2014-10-15T05:14:01.000Z</time> </trkpt> |