value is not getting assigned inside the while loop

view story

http://stackoverflow.com – below is my code. Here i'm replacing 2nd column which is having value as "1" to "1AM" but it's not working. #! /bin/ksh file="TOTAL_SALES_UNITS_ORDERS_SORTDATA1.txt" while IFS=":" read f1 f2 f3 f4 f5 do if [[ $f2 -eq '1' ]]; then print $f2 f2="1AM" print $f2 fi IFS=":" done < "$file" the expected result is column 2 is to updates as 1AM, where the value is 1. but the file is not getting updated, the echo value shows 1AM but file has value "1". Is there a anything wrong in the code? please guide thanks in advance! (HowTos)