Subject: Re: Wierd quoting constructs in sed edit strings
To: Michael South <>
From: Jonathan Perkin <>
List: tech-pkg
Date: 09/15/2003 15:02:33
* On 2003-09-13 at 09:34 BST, Michael South wrote:

> What's the reason for this?
> ./audio/wmmp3/Makefile: ${SED} -e 's:/usr/local:'${LOCALBASE}':g' \
> The apparently nested single-quotes were freaky, until I figured out 
> that the shell was interpreting it as three concatenated strings:

Single quotes quote verbatim, so without the "nested" quotes you'd
end up with a literal ``${LOCALBASE}'' rather than what the shell
evaluates the variable to, e.g:

  $ FOO=bar
  $ echo ${FOO}
  $ echo '${FOO}'

Jonathan Perkin                         <>
BBC Internet Services