Example:
File1:
Name: abc
Number: 325
Code: 0
File2:
Name: xyz
Number: 578
Code: 0
File3:
Name: ttt
Number: 356
Code: 0
File4:
Name: nnn
Number: 228
Code: 0
File5:
Name: bnb
Number: 434
Code: 0
Question is how to change Code to 1 but only if Number is 3xx or 2xx. So File2 and File5 remain unchanged.
Files have a lot more lines, and there are about 100 files, but this is just simplified example, how to replace one string in file (line x) but only if other string (line y) in that file is corresponding.
Code:line always follow right after theNumber:line?