On 02/28/2012 05:22 PM, Roman Rakus wrote:
On 02/28/2012 05:10 PM, John Kearney wrote:
wrap it with single quotes and globally replace all single quotes in the
string with '\''
single quote and slash have special meaning so they have to be
escaped, that's it.
\'${var//\'/\\\'}\'
it is not quoted, so it undergoes word splitting. To avoid it quote it
in double quotes, however it changes how slash and single quote is
treated.
"'${var//\'/\'}'"
Wasn't it already discussed on the list?
RR
And that means, there isn't way to substitute "something" to ' (single
quote) when you want to not perform word splitting. I would consider it
as a bug.
RR