A
A
AlexanderAstafiev2014-05-03 09:21:02
linux
AlexanderAstafiev, 2014-05-03 09:21:02

How to use sed to search and replace substrings containing "/"?

How to use sed to search and replace substrings containing "/"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Zhivotnev, 2014-05-04
@AlexanderAstafiev

It needs to be screened. In its simplest form (replace / with a space throughout the file):
sed -i 's/ \/ / /g' file
The bauded - / and its escaping (\). The rest is construction of sed itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question