Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Mar 2001 18:26:54 +0200
From:      Peter Pentchev <roam@orbitel.bg>
To:        Mario Sergio Fujikawa Ferreira <lioux@uol.com.br>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: FreeBSD port openjade patch
Message-ID:  <20010304182654.E71838@ringworld.oblivion.bg>
In-Reply-To: <20010226144045.A27621@Fedaykin.here>; from lioux@uol.com.br on Mon, Feb 26, 2001 at 02:40:45PM -0300
References:  <20010226144045.A27621@Fedaykin.here>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 26, 2001 at 02:40:45PM -0300, Mario Sergio Fujikawa Ferreira wrote:
[snip]
> 	Why the following sed and perl regexps are not similar?
> 
> 	1) ${SED} -e 's/-m[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?//g' \
> 		-e 's/-O[s2-9]+//g
> 	2) ${PERL} -p -ne "s/-O[s2-9]+//g;s/-m[0-9a-z]+(=[0-9a-z]*)?//g"
> 
> 	Applied against the following test
> CFLAGS=-O -pipe -Wall -march=pentium -mcpu=pentium -mpentium -Os
> I get the following respective results:
> 
> 	1) CFLAGS=-O -pipe -Wall -mpentium -march=pentium -mcpu=pentium -Os
> 	2) CFLAGS=-O -pipe -Wall

I think you want sed's -E flag which makes it process extended regular
expressions.  Without it, sed does not recognize '+', and wants \( \)
instead of ( and )..  sed -E -e 'your expressions' worked fine for me.

G'luck,
Peter

-- 
Thit sentence is not self-referential because "thit" is not a word.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010304182654.E71838>