I have a file like this:
I want to replace all occurences of \ with #, except for \N, such that the output looks like this:
I am trying to write a sed command which looks like-
sed -e 's@\\([^N])@#\1/g' filename
but this will fail for all values wherever there is a \N at the start for ex.
\Nato in above example.
Could somebody please help me figure out a sed command(regex) for my requirement.