I have a fixed width file and i need to change 36th field to "G" in for about random 20 records? How can I do it?
Since I'm not sure what exactly you mean, here's a list of sed-one-liners, I hope you'll find what you looking for.
sed '4,6 s/\(.\{35\}\)./\1G/' temp.txt>sample.txt
This will modify the 36th character from line number 4-6 (u can modify it for 20 lines)
hope this helps
can you let me know where i should give the character to what it needs to be modifed too.
sed '4,6 s/\(.\{35\}\)./\1G/' temp.txt>sample.txt
change the value of G to the one u want