home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] GPX Files

https://www.google.ca/search?q=bash+find+matching

find / -name "*.gpx" | xargs rm

This assumed there are no spaced in the paths produced by "find".

On 03/07/14 12:34, Bruce wrote:
OCLUG,

I need script would delete all my found caches in a
GPX file. This is a XML based file format.

Each entry starts with <wpt SOMETHING >

WITH A BUNCH OF LINES IN THE MIDDLE, INCLUDING THIS LINE WHICH
INDICATES I'VE FOUND THE CACHE.  WHAT IS IN BETWEEN THE OPENING
AND CLOSING TAGS CAN VARY A LOT.

  <groundspeak:finder
id="A_NUMBER">danceswithwords</groundspeak:finder>


Ends with <wpt/ >



SAMPLE BELOW:

<?xml version="1.0" encoding="utf-8"?>
<gpx xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="1.0"
creator="Groundspeak Pocket Query"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0
http://www.topografix.com/GPX/1/0/gpx.xsd
http://www.groundspeak.com/cache/1/0/1
http://www.groundspeak.com/cache/1/0/1/cache.xsd";
xmlns="http://www.topografix.com/GPX/1/0";>
   <name>findsdww</name>
   <desc>Geocache file generated by Groundspeak</desc>
   <author>Groundspeak</author>
   <email>contact [ at ] groundspeak [ dot ] com</email>
   <time>2014-07-03T13:06:39.5348201Z</time>
   <keywords>cache, geocache, groundspeak</keywords>
   <bounds minlat="45.030217" minlon="-76.216183" maxlat="45.302767"
maxlon="-75.743233" />
   <wpt lat="45.11775" lon="-75.985417">
     <time>2014-04-20T07:00:00Z</time>
     <name>GC530ZV</name>
     <desc>TinkerBelof7 and BuddySally here's one for you !! by stinkerbel,
Traditional Cache (3/2.5)</desc>
     <url>http://www.geocaching.com/seek/cache_details.aspx?guid=72d40f3d-32f3-4e17-afe5-3be1de142d63</url>
     <urlname>TinkerBelof7 and BuddySally here's one for you
!!</urlname>
     <sym>Geocache Found</sym>
     <type>Geocache|Traditional Cache</type>
     <groundspeak:cache id="4296814" available="True" archived="False"
xmlns:groundspeak="http://www.groundspeak.com/cache/1/0/1";>
       <groundspeak:name>TinkerBelof7 and BuddySally here's one for you
!!</groundspeak:name>
       <groundspeak:placed_by>stinkerbel</groundspeak:placed_by>
       <groundspeak:owner id="9200268">stinkerbel</groundspeak:owner>
       <groundspeak:type>Traditional Cache</groundspeak:type>
       <groundspeak:container>Small</groundspeak:container>
       <groundspeak:attributes>
         <groundspeak:attribute id="15" inc="0">Available during
winter</groundspeak:attribute>
         <groundspeak:attribute id="32"
inc="1">Bicycles</groundspeak:attribute>
         <groundspeak:attribute id="47" inc="1">Field
Puzzle</groundspeak:attribute>
         <groundspeak:attribute id="11" inc="1">May require
wading</groundspeak:attribute>
         <groundspeak:attribute id="7" inc="1">Takes less than an
hour</groundspeak:attribute>
         <groundspeak:attribute id="53" inc="1">Park and
Grab</groundspeak:attribute>
         <groundspeak:attribute id="19"
inc="1">Ticks</groundspeak:attribute>
       </groundspeak:attributes>
       <groundspeak:difficulty>3</groundspeak:difficulty>
       <groundspeak:terrain>2.5</groundspeak:terrain>
       <groundspeak:country>Canada</groundspeak:country>
       <groundspeak:state>Ontario</groundspeak:state>
       <groundspeak:short_description html="True">PLEASE ONLY PHOTOS
OF THE UNOPEND CACHE. any spoilers WILL be deleted
</groundspeak:short_description>
       <groundspeak:long_description html="True">&lt;p style="font-
style:italic;"&gt;~~I was always going out with TinkerBelof7 and
sometimes BuddySally. Well they kept on saying why don’t you go and get
an account because you are out with us any way so why not log them also
and get the smiley. So here I am now signed up with Geocaching .com and
I may not have not logged many finds but I have found my share. Now I
know how TinkerBelof7 and BuddySally think. So TinkerBelof7 and
BuddySally here is my take on a park and grab. Enjoy the fun.&lt;/p&gt;

</groundspeak:long_description>
       <groundspeak:encoded_hints>swiss army knife will not work. You
always have the tool on hand.</groundspeak:encoded_hints>
       <groundspeak:logs>
         <groundspeak:log id="419772921">
           <groundspeak:date>2014-06-21T19:00:00Z</groundspeak:date>
           <groundspeak:type>Found it</groundspeak:type>
           <groundspeak:finder id="614143">gis-guy</groundspeak:finder>
           <groundspeak:text encoded="False">Found this with the SOB's...
Greely Grizzly, Mudlark, GeoMo&amp;Clo and
Danceswithwords.</groundspeak:text>
         </groundspeak:log>
         <groundspeak:log id="418521442">
           <groundspeak:date>2014-06-21T19:00:00Z</groundspeak:date>
           <groundspeak:type>Found it</groundspeak:type>
           <groundspeak:finder id="363827">Greely
Grizzly</groundspeak:finder>
           <groundspeak:text encoded="False">The Southend Old Boys
(Mudlark, geomo&amp;clo, Gis-Guy, Dances with Words and yours truly)
went west today to tackle these caches in the Munster/Dwyer Hill area.

Was a fun run and while mostly park and grabs, the "grab" wasn't always
easy. Most were well hidden and camoed.

Not at the first tree we checked but of course at the second wetter tree.

Fun container to open with of course a "twist" to find and sign the log.

SL. TFTC.

Greely Grizzly</groundspeak:text>
         </groundspeak:log>
         <groundspeak:log id="418276712">
           <groundspeak:date>2014-06-21T19:00:00Z</groundspeak:date>
           <groundspeak:type>Found it</groundspeak:type>
           <groundspeak:finder
id="1757086">geomo&amp;clo</groundspeak:finder>
           <groundspeak:text encoded="False">The SOBs consisting of
Greely Grizzly, Mudlark, GisGuy, Danceswithwords and myself, went out on
their Saturday hunt in the West end. GisGuy grabbed the container and the
puzzle was solved quite rapidly. No special tools required to find the log.
Great puzzle and a Fav for me.</groundspeak:text>
         </groundspeak:log>
         <groundspeak:log id="418133957">
           <groundspeak:date>2014-06-21T19:00:00Z</groundspeak:date>
           <groundspeak:type>Found it</groundspeak:type>
           <groundspeak:finder
id="329854">danceswithwords</groundspeak:finder>
           <groundspeak:text encoded="False">The SOBs (Mudlark, GIS-Guy,
Greely Grizzly, Geomo&amp;clo) it was a beautiful morning to get out and
enjoy the back roads  of Ottawa.

This entry was edited by danceswithwords on Monday, 23 June 2014 at
21:52:19 UTC.</groundspeak:text>
         </groundspeak:log>
         <groundspeak:log id="416251751">
           <groundspeak:date>2014-06-14T19:00:00Z</groundspeak:date>
           <groundspeak:type>Found it</groundspeak:type>
           <groundspeak:finder
id="4055592">thebells001</groundspeak:finder>
           <groundspeak:text encoded="False">nice!!!!  find was easy enough.
loved the twist.  took awhile to sign the log.  had 1 kind person stop and
ask if we were ok.  lids had a suggestion, only that was too big.  glad we
were able to hang around and finally sign the log. TFTC.  loved
it</groundspeak:text>
         </groundspeak:log>
       </groundspeak:logs>
       <groundspeak:travelbugs />
     </groundspeak:cache>
   </wpt>

_______________________________________________
Linux mailing list
Linux [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
http://oclug.on.ca/mailman/listinfo/linux


--
Jean-Luc Cooke
+1-613-263-2983


replies

references

message navigation