Reputation: 264
I have the file below:
sadhun:ganesh:02/02/1990:345
Hari:Prasad:30/05/1989:567
I need to replace only the first colon ':
' with a space and leave the other colons untouched.
I tried in awk
but was only able to modify all the colons.
Upvotes: 0
Views: 89
Reputation: 161874
Try this command:
sed -i 's/:/ /' input.txt
It'll only replace the 1st :
to whitespace
.
The -i
option is for editing file in place.
Upvotes: 2