Reputation: 23
I have a huge file around 10 GB. And I want to replace its 35th column (separated by ;). Since, its a huge file, opening file in an editor is not an option. I want to do replace in all the lines of file.
Somebody suggested me to use Sed but i am not comfortable with it yet. Could somebody suggest a unix command that can achieve the same.
Upvotes: 0
Views: 8940
Reputation: 81
the accepted solution didn't work for me. But helped me in finding this:
awk '{$35 = "replacement"; print $0}' < oldfile > newfile
for a tab separated file
Upvotes: 0
Reputation: 58430
This might work for you (GNU sed):
sed -i 's/[^;]*/replacement/35' file
Upvotes: 0