how to replace 5th column across file in unix
awk is a good tool for parsing files. Assuming that whitespace is the field delimiter, this replaces the 5th column with string "value":awk ' { $5="value"; print } ' datafile.txt > newdatafile.txt
awk ' { $5="value"; print } ' datafile.txt > newdatafile.txt