Name: Anonymous 2008-03-09 7:46
i'm looking for a way to make sed NOT parse too much into the replace pattern
basically i'm trying to put a variable into the replace pattern, not a problem except that this variable contains stuff like -Wl and so forth, i suspect this makes sed bug out and throw errors like this
when i run code like this
on text like this
and the content of the $PERL_LDOPTS variable is
so do i have to escape all the dashes or can i solve this with a sed argument?
basically i'm trying to put a variable into the replace pattern, not a problem except that this variable contains stuff like -Wl and so forth, i suspect this makes sed bug out and throw errors like this
sed: 1: "s/^PERL_LDOPTS=/PERL_LD ...": bad flag in substitute command: 'u'when i run code like this
MAKEFILE=`echo "$MAKEFILE" | sed s/^PERL_LDOPTS=/PERL_LDOPTS="$PERL_LDOPTS"/`on text like this
PERL_LDOPTS=and the content of the $PERL_LDOPTS variable is
-Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE -Wl,-E -L/usr/local/lib /usr/local/lib/perl5/5.8.8/mach/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.8.8/mach/CORE -lperl -lm -lcrypt -lutilso do i have to escape all the dashes or can i solve this with a sed argument?