Article 5H0NY Find and replace text with '/' character

Find and replace text with '/' character

by
dr.x
from LinuxQuestions.org on (#5H0NY)
Hello Folks ,

I know how to find and replace text :

find /root/kutku7/ -type f -exec sed -i -e 's/findme//root/findx10/g' {} \;

Above will replace findme with ---> findx10

But what if I want to replace findme with ---> /root/findx10 ?

I tried to use :

find /root/kutku7/ -type f -exec sed -i -e 's/findme//root/findx10/g' {} \;
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'
sed: -e expression #1, char 11: unknown option to `s'

The question is how to make find and replace something that contains "/" ?

Thankslatest?d=yIl2AUoC8zA latest?i=CwpwhGi9NiE:SFrMUZWIu3E:F7zBnMy latest?i=CwpwhGi9NiE:SFrMUZWIu3E:V_sGLiP latest?d=qj6IDK7rITs latest?i=CwpwhGi9NiE:SFrMUZWIu3E:gIN9vFwCwpwhGi9NiE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments