Quotes within quotes within quotes in bash. :)
Kimball Larsen
kimball at kimballlarsen.com
Fri Jun 23 16:20:12 MDT 2006
sorry, I should have clarified:
On Jun 23, 2006, at 3:52 PM, Nicholas Leippe wrote:
> On Friday 23 June 2006 15:42, Kimball Larsen wrote:
>> Then you get quotes within quotes within
>> quotes - which bash disallows.
>
> How is it disallowed? As long as the data is properly escaped/
> encoded, you
> should be able to pass anything.
>
> echo "\"a\""
> sh -c "echo \"\\\"a\\\"\""
> sh -c "sh -c \"echo \\\"\\\\\\\"a\\\\\\\"\\\"\""
>
sorry, I should have clarified:
if I want an " 'a' " as the output:
echo ' " ' a ' " ' => " a "
echo ' " \' a \' " ' => wants more input.
What I meant was single quotes within double quotes within single
quotes.
-- Kimball
More information about the PLUG
mailing list