Unescpaing huge single-line string on Linux
- by Lajos Nagy
I ended up with a huge, single line string literal (don't ask me how) where everything is escaped (mostly), including new lines and double quotes. Problem is, I want the original string. The string is huge so I'm not even sure how to begin. Here's what I have:
"This\n is \"nice\",\nain\'t it?"
This is what I want:
This
is "nice",
ain't it?
Again, the problem is that other shell sensitive stuff is not escaped (like $, or !), and that the string is couple of megabytes.