Home > Net >  / in a script variable
/ in a script variable

Time:10-13

I'd like to replace Music by Music/Oliver

The command:

find ./ -type f -exec sed -i 's/Music/MusicOliver/gI' {} \;

How do I insert the / without interrupting the command? I've tried with "string" and 'string' but it didn't work.

Thanks for your hints!

CodePudding user response:

You can use a different delimiter for sed command like

find ./ -type f -exec sed -i 's|Music|Music/Oliver|gI' {} \;
  • Related