jtr1962
Storage? I am Storage!
I'm currently in the process of editing a couple of hundred unicode text files. The editing process involves changing a few dozen to a few hundred numbers in each file that appear in the following format:
point ( -115.214 0.2 648.984 )
point ( -115.214 0.325 648.984 )
point ( -115.356 0.325 648.935 )
point ( -115.356 0.2 648.935 )
point ( -116.713 0.2 648.468 )
point ( -116.713 0.325 648.468 )
point ( -116.854 0.325 648.419 )
point ( -116.854 0.2 648.419 )
Notice that we have sets of three numbers(x,y,z coordinates). I'm interesting in changing some of the first numbers(x coordinates). In this example, we have -115.214 twice followed by -115.356 twice. The difference is ~0.15 and I need to change the second two numbers to -115.289 so that the difference is 0.075. Same deal with the next set of four coordinates below it, etc.
Right now I need to find the numbers I want to change, manually or mentally subtract 0.075, and then put in the result. This is tedious to say the least, and I want to get done with this sometime before I'm a senior citizen. Is there a text editor that will search for numbers, and then perform simple operations on each number only if you want it to, and then search for the next one? Ideally, I want to be able to hit a key or two, jump to the next number, change it(or not), jump to the one after that, etc. Right now I don't have an exact algorithm for finding the number I want to change, but just know which one it is based on it's location relative to the other numbers. This is why I want an optional subtract and replace rather than an automatic one. If I can eventually figure out an algorithm I could write a simple C program to do this, but as of now I just don't see much of a pattern, or at least not one that I could easily program for with my limited programming skills.
Are there any text editors that can also manipulate numbers like I want to? Nothing fancy, just a simple addition or subtraction of a constant is all I'm really looking for.
point ( -115.214 0.2 648.984 )
point ( -115.214 0.325 648.984 )
point ( -115.356 0.325 648.935 )
point ( -115.356 0.2 648.935 )
point ( -116.713 0.2 648.468 )
point ( -116.713 0.325 648.468 )
point ( -116.854 0.325 648.419 )
point ( -116.854 0.2 648.419 )
Notice that we have sets of three numbers(x,y,z coordinates). I'm interesting in changing some of the first numbers(x coordinates). In this example, we have -115.214 twice followed by -115.356 twice. The difference is ~0.15 and I need to change the second two numbers to -115.289 so that the difference is 0.075. Same deal with the next set of four coordinates below it, etc.
Right now I need to find the numbers I want to change, manually or mentally subtract 0.075, and then put in the result. This is tedious to say the least, and I want to get done with this sometime before I'm a senior citizen. Is there a text editor that will search for numbers, and then perform simple operations on each number only if you want it to, and then search for the next one? Ideally, I want to be able to hit a key or two, jump to the next number, change it(or not), jump to the one after that, etc. Right now I don't have an exact algorithm for finding the number I want to change, but just know which one it is based on it's location relative to the other numbers. This is why I want an optional subtract and replace rather than an automatic one. If I can eventually figure out an algorithm I could write a simple C program to do this, but as of now I just don't see much of a pattern, or at least not one that I could easily program for with my limited programming skills.
Are there any text editors that can also manipulate numbers like I want to? Nothing fancy, just a simple addition or subtraction of a constant is all I'm really looking for.