Subject: Re: Escape Character...
To: Yosep <yoskim@NMSU.Edu>
From: Pierre Bourgin <pierre.bourgin@pcotech.fr>
List: tech-pkg
Date: 07/01/2003 10:21:39
Yosep a écrit:
> Hello!
> 
> I have the following code in my Makefile
> 
> my_RCS_ID=	$NetBSD$
> 
> ...
> 
> pre-install:
> 	${SED} -e 's:@PREFIX@:${my_RCS_ID}:' \
>                 ${WRKSRC}/my_file.sh > ${WRKSRC}/my_file.sh
> 
> 
> However, this code doesn't work right, because my_RCS_ID variable contains
> something that starts out with a $ sign.  So, at the end, in place of
> @PREFIX@, my_file.sh would have "etBSD" or something bizarre.
> 
> How can I fix this problem, so that I can have "$NetBSD" in place of
> "@PREFIX"?  Any would be greatly appreciated.


my_RCS_ID=	\$NetBSD\$

should work (if you're not evaluate two times this kind of strings).

Regards,

Pierre Bourgin