In shell script, how do I iterate through each line in an ASCII file and perform an operation on its value
This is the example for an ASCII file which I have
23 3.4e-09 55.90 5.7e-07 24 12.5 79.90 7.9e-09 25 67.9 78.9 3.4e-09 26 98.8 89.67 9.7e-09
how cum it will take first line and the iterate…
WAT DO U MEAN BY LINE
One way (in bash and ksh, at least, may also work in plain sh) is by using something like:
However, this will modify whitespace on each line. If you have a ‘sufficiently fixed’ format on the lines (say each line is ValA ValB ValC), you can modify read line to read vala valb valc