Hi Friends,
I need a sed or awk based script to replace a character(alphabet) with ' (Apostrophe). I tried to use the following two commands
1) sed -e 's/a/'/' filename
2) awk '{sub("a","'",$1);print}' filename
but both got failed.
Any help on this.
Thanks in advance..
/home/chris>cat test.out
testing a script
/home/chris>sed -i "s:a:\':g" test.out
/home/chris>cat test.out
testing ' script
kodak
3
You're close, you can do it with:
sed -e "s/a/'/" filename (note the quote types.)