3 ms·
There's an easier way to escape in bash (that I didn't know about for very many hours of frustration): $ echo $'foo"\'"bar' $"foo'\"'bar" foo"'"bar $
by ydant 5y ago
There's an easier way to escape in bash (that I didn't know about for very many hours of frustration):
$ echo $'foo"\'"bar' $"foo'\"'bar"
foo"'"bar $foo'"'bar
- superasn 5y agoYes I learned the same too yesterday from Hacker news. What a coincidence! There was also a bashquote function which you can put in your .bashrc file but this approach really beats everything!