Tks for the help folks.

Yes, the s/'/"/g was an error, but the true problem was that there was a
"/" character in one of the variables being substituted in and the regexp
was getting confused over that.

-- 
Howard.
______________________________________________________
LANNet Computing Associates <http://www.lannet.com.au>

On Tue, 22 Aug 2000, Howard Lowndes wrote:

> This is an example of a script I am trying to put together:
> 
> #!/bin/sh
> PATH=/bin:/sbin:/usr/bin:/usr/sbin
> . /etc/site-params
> sed -e 's/CHARS/$CHARS/g' this.file
> 
> 
> Line 3 puts the variable CHARS into the local environment.  What I then
> want the sed to do is to run thru this.file and replace all occurences of
> the string CHARS with the value of the variable $CHARS.
> 
> All it achieves though is to replace the string CHARS with the string
> $CHARS, which is not what I want.
> 
> Can someone please suggest (politely) what I should do here.
> 
> 



--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to