I have several tables (tab separated) in which the first column is as follow:MONTH0.000.000.000.000.000.000.000.000.000.000.000.00I would like to replace those values by the actual month value, as follow:MONTH123456789101112
Table - Replace values of a column
table
Using awk to replace the first field with the line number-1 would work for your example case$ awk 'BEGIN {FS=\t ; OFS=\t } NR>1 { $1=NR-1} { print}'e.g.$ cat xMONTH   DATA0.00    something0.00    data0.00    here0.00    blah0.00    blah0.00    blah0.00    blah0.00    blah0.00    blah0.00    blah0.00    blah0.00    blah$ awk 'BEGIN {FS=\t ; OFS=\t } NR>1 { $1=NR-1} { print}' xMONTH   DATA1       something2       data3       here4       blah5       blah6       blah7       blah8       blah9       blah10      blah11      blah12      blah