Re: bash quoting problems
>>>>> thomas kral <email@example.com> writes:
>>> I have a problem with the following sed snippet
>>> sed -i s"|^\( *PATH="\)\(.*\)|\1$ADD:\2|" ~/profile-test
>>> I need soft quotes in order for $ADD to expand and I also need to math
>>> against one doublequote in the regexp in for $ADD to be put in the
>>> corrct place. Does anyone know how to do this?
>> You may want to consider putting the sed script in a file and using
>> the -f script (or --file=script) option instead.
>> No quoting needed. ;)
> BTW, since Squeeze default shell is dash, not bash
There's no difference in double quotes interpretation between
Bash and Dash (not any that I'm aware of, anyway.)
Also, the OP has explicitly stated which shell is used, and even
if /bin/sh is Dash in Debian, scripts having #!/bin/bash at the
top will still use Bash.
(Somehow I think that Bash is the default users' shell just as
FSF associate member #7257