sed flat file manipulation

Hello, I have a large flat file where i need to change data in columns 131-133 based on what is in columns 172-173. I am not sure if I need to read the file line by line and make the change or if I can do this in a single statement. thank you

If you want to do the change in every line, you'll need to read and modify every single line.

ok thank you

But, the program to read every single line, modify it, and write it back out might still be a single line.

If you'd give us sample input, a description of the rules that specify what changes are to be made, and sample output; we might be able to help you solve your problem.