[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Clueless with sed



>>
>> $ echo 'NAME said hi' | sed -e "s/NAME/$CVS_FULLNAME/"
>> Sean 'Shaleh' Perry said hi
>> $ echo 'NAME said hi' | sed -e 's/NAME/$CVS_FULLNAME/'
>> $CVS_FULLNAME said hi
> 
> Your examples are okay, It seems I need to use double quotes...
> However, it stil is wrong, when using:
> BASEDIR=`pwd`; sed "s/_ENVPATH_/\$BASEDIR/g" config
> 
> I still get:
> DEVEL_PREFIX = $BASEDIR/$(TARGET_ARCH)-linux-uclibc
> 

right, you will note that I did not escape the $ in my example

> Must have something to do with the way I use sed.
> This seems to work (thanks to Eric Hanchrow <offby1@blarg.net>):
> BASEDIR=`pwd`; sed "s,_ENVPATH_,$BASEDIR,g" config
> 

yeah using the commas was a good idea.


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: