Change text at a variable position

view story

http://www.unix.com – Hi there script guru's I have an input file /tmp/in.txt of which the data is seperated by a : (example of the data) test1:zz:2000:2000:zzz te:a:2000:3333:bbb testabs:x:2004:3000:cccc I would like to run a scrip (bash) changing the data after the second ":" example Test for the value of 2000. If the value is 2000 do Change the 2000 on line one(after the second ":" to 5000 - but do not change the 2000 after the third :) The second line's 2000 must also changed to 5000 The 3rd line must not change (value ne 2000) The data may vary, but the only changes that must be made to (HowTos)