0

I have a pretty big json file and I would like to add the escape character in front of all quotation marks in it. For example I want to change: "CaptureDuration":0 to \"CaptureDuration\":0. I tried to substitute all " with \" in sed and vim but I guess due to the special type of the escape character it wasn't working properly.

1 Answer 1

1

Use sed and you needed to escape \ as it's special character:

sed 's/"/\\"/g' infile
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.