Category "escaping"

Use a variable's value in a sed command [duplicate]

I can't seem to use a variable in a sed command, for example: sed "24s/.*/"$ct_tname"/" file1.sas > file2.sas I want $ct_tname the varia

What is the correct way to force JSON.Net to escape forward slash (solidus) characters?

So for business reasons I need to force JSON.NET to escape a JSON blob like so: { url: 'http://some.uri/endpoint' } As { "url": "http:\/\/some.uri\/endpoint