In a text file i have fifth column with some value.How can i change the values of fifth column by awk command

65 views Asked by At

In a text file i have fifth column with some value. 1 44540 23.25 82.25 0.25 0.0315 0.006 like that i have 50 rows.

How can i change the values of fifth column by awk command.

1

There are 1 answers

1
Stig Hemmer On
awk '{$5=$5+1;print}'

Assigning to $5 automatically recalculates $0. "print" prints the new $0.