I'm writing a shell script to create some config files.
I also have to replace some patterns in the files and one pattern should get replaced with a path.
So my question is: Is there a way to replace my placeholder webpath with a path without setting backslashes in front of the slashes?
Maybe there is another tool available to do this?
You can use an alternative regex delimiter as a search pattern by backslashing it:
And just use it as is for the
You probably want to protect other metacharacters, though; this is a good place to use Perl and
quotemeta, or equivalents in other scripting languages.
/regexp/ Match lines matching the regular expression regexp. \cregexpc Match lines matching the regular expression regexp. The c may be any character.