Increment values in a string
by Johng from LinuxQuestions.org on (#59093)
I have a file with many lines of the form:
<trkpt lon="174.92797852" lat="-41.24854279">
I'm looking for a way to create a script to increment each lon value by a common factor and each lan value by another common factor, ie add .00022 to the lon value and .00044 to the lat value.
I thought I might be able to do this with sed but my limited knowledge fails me


<trkpt lon="174.92797852" lat="-41.24854279">
I'm looking for a way to create a script to increment each lon value by a common factor and each lan value by another common factor, ie add .00022 to the lon value and .00044 to the lat value.
I thought I might be able to do this with sed but my limited knowledge fails me