Hi,
The problem is like this:
I have many files with fixed format except some values in the files are different. The file will take about 600 lines on Unix/Linux machines. Some lines are very long so viewing from text editors, the lines will be broken into two or more.
Now the task pull out some data from the long file. I know the data locates between texts "** start " and "results", for example:
My question is how to locate the part of text so that I can pull out the data, say, row=11 and col=22 in the above example?
The other question I remember someone had asked before but I could not get it from search. So bear with patience. In the above example, row = 11 is needed to be extracted. However, row=1.1e1 is also the same as row=11. How to treat this wild case? I plan to use an array, but considering this case may happen, the array is too large. In more detail, all these values should be in the array:
@one={1.1 11 110 1100 1.1k 11k 11000 110k 110000 2.2 22 ...}
there are 30 such values(11,22,33,...)
Is there a better way to do that?
The problem is like this:
I have many files with fixed format except some values in the files are different. The file will take about 600 lines on Unix/Linux machines. Some lines are very long so viewing from text editors, the lines will be broken into two or more.
Now the task pull out some data from the long file. I know the data locates between texts "** start " and "results", for example:
Code:
..... many other texts ...
** start: abc, def
row 1 2 11
col 3 4 22
(more lines follow)
results:
...
(the other lines follow)
My question is how to locate the part of text so that I can pull out the data, say, row=11 and col=22 in the above example?
The other question I remember someone had asked before but I could not get it from search. So bear with patience. In the above example, row = 11 is needed to be extracted. However, row=1.1e1 is also the same as row=11. How to treat this wild case? I plan to use an array, but considering this case may happen, the array is too large. In more detail, all these values should be in the array:
@one={1.1 11 110 1100 1.1k 11k 11000 110k 110000 2.2 22 ...}
there are 30 such values(11,22,33,...)
Is there a better way to do that?