Andrew you are dead right about python being the way to go I agree entirely
the only reason for doing it this way is a lack of python knowledge but I hope to correct this in the future currently I have a range of simple bash stuff for various GPS tasks this script was just cut out of one of them & was a quick and dirty way of solving my current issue as for the single '&'s I will fix that too ... ta cheers...dave 2008/8/8 Dave G <[EMAIL PROTECTED]> > Jasper > > sed "s/WPT001/$WPTN/" $LOC/loc2test.gpx > $LOC/loc2test_sed.gpx > > gave the right result, however one weird thing is that even with the ../g" > global switch it > changed all the "WPT001"'s rather than just the first instance ? > > (output): > > <wpt lat="-43.571090000" lon="172.689703333"> > <ele>-2.800000</ele> > <time>2008-08-06T23:57:50Z</time> > <name>WP1450</name> > <cmt>WP1450</cmt> > <desc>WP1450</desc> > <fix>dgps</fix> > <sat>9</sat> > > many thanks > > dave > > > 2008/8/8 Dave G <[EMAIL PROTECTED]> > > Jasper >> >> I've previously tried double quoting "$WPTN" ... no luck ... somewhere >> else? >> >> 2008/8/8 Jasper Bryant-Greene <[EMAIL PROTECTED]> >> >> On Fri, 2008-08-08 at 14:15 +1200, Dave G wrote: >>> > sed 's/WPT001/$WPTN/' $LOC/$WPTF > $GCF/$WPTY >>> >>> Use double quotes here if you want the variable to be expanded. >>> >>> -Jasper >>> >>> >> >
