I have a input file that I need to replace first character of column 3 (“) with (“S)
File1:
1 2 "45554323" p b
2 2 "34534567" f a
3 3 "76546787" u b
2 4 "56765435" f a
Result:
1 2 "S45554323" p b
2 2 "S34534567" f a
3 3 "S76546787" u b
2 4 "S56765435" f a
I tried
awk '{gsub(substr($3,0,1),"\"S"); print}'
but it gives me $3 with S at begin and the end, like "S45554323"S. Can you give me a solution?
Try with:
That yields:
Or with
sed: