On Tue, 22 Aug 2000, you wrote:
> ; $CHARS is not being expanded when enclosed within single quotes.
> ;
> ; try:
> ; sed -e "s?CHARS?$CHARS?g"
>
> firstly, you don't need the -e.
good point.
> secondly, there's no need for an
> alternate pattern/replacement seperator, sed is smart enough to
> recognise that when '$' is followed by something, it doesn't denote
> end of line.
this I know. But if the result of the variable expansion contains
the pattern/replacement seperator, the script will break (ie., if
$CHARS='foo/bar', "s/CHARS/$CHARS/g" fails).
--
Jim.
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug