I want to replace 5th column across a file.

August 23, 2011 at 00:25:10
Specs: Windows XP
how to replace 5th column across file in unix

See More: I want to replace 5th column across a file.

Report •

#1
August 23, 2011 at 07:05:19
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


Report •
Related Solutions


Ask Question