You can use any text editor. DeleteFor combining tracksegments delete all occasions where a closing trkseg tag is followed by a starting trkseg tag. As a result you will have just one track segment. ItThen do the same for followed by . There is a bit more to delete as well but you'll get the idea. Keep the one starting trk tag, the name of the first trk, the trackpoints, and closing trk tag. The resulting single track may have very odd jumps in time and location but I guess that you know it.
<trk>
<name>TRACK_NAME</name>
<trkseg>
<trkpt lat="49.0" lon="2.0">
</trkpt>
<trkpt lat="50.0" lon="3.0">
</trkpt>
</trkseg> *****DELETE ***DELETE
<trkseg> *****DELETE ***DELETE
<trkpt lat="51.0" lon="3.0">
</trkpt>
</trkseg> ***ONCE TRK IS DELETED DELETE THIS
</trk> ***DELETE
<trk> ***DELETE
<name>TRACK_NAME2</name> ***DELETE THIS ALSO
<trkseg> ***ONCE TRK IS DELETED DELETE THIS
<trkpt lat="49.0" lon="3.0">
</trkpt>
</trkseg>
</trk>