Unescape with pipe

Given this file

$ cat foo.txt
\"That's funny, haha\"

I can unescape the double quotes with read

$ read bar < foo.txt

$ echo $bar
"That's funny, haha"

However can this be done with a pipe? Something like

cat foo.txt | unescape


This seems to do it

sed -r 's/\\(.)/\1/g'

Need Your Help

Sort a multidimensional array by date php

php sorting date multidimensional-array

I have an array [all_comments] which contains 3 arrays - [title], [content] and [date].

Why PDO does not bind my params?

php pdo parameters bind defined

I have a query with some parameters that I bind with PDO. This is my code: