Replacing all occurrences of rakesh to raka in file tst
sed s/rakesh/raka/ tst-1
sed s/raka/rakesh/ < tst-1 > tst-2
$ echo rakesh | sed s/rakesh/raka/
raka
I am raka
I am raka
s: Substitute Command
/../../ : Delimiter
rakesh : Regular Expression Pattern Search Pattern
raka : Replacement String
hi rakesh parwal
here is the directory /tmp/rk/1
No comments:
Post a Comment