I\'m running this awk program :
awk -F: \'{if($1==\"waheed\") {$2=1;print $0}}\' /etc/passwd
and the output is:
mysql 1 118 129
In awk output is seperated by the contents of the OFS ( output field seperater ) variable a space by default. This can be set with -v OFS=':'
awk -F : -v OFS=':' '{ cmds}' file