From owner-freebsd-ports Sun Mar 4 8:27:24 2001 Delivered-To: freebsd-ports@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id BDCB337B719 for ; Sun, 4 Mar 2001 08:27:20 -0800 (PST) (envelope-from roam@orbitel.bg) Received: (qmail 76571 invoked by uid 1000); 4 Mar 2001 16:26:54 -0000 Date: Sun, 4 Mar 2001 18:26:54 +0200 From: Peter Pentchev To: Mario Sergio Fujikawa Ferreira Cc: freebsd-ports@freebsd.org Subject: Re: FreeBSD port openjade patch Message-ID: <20010304182654.E71838@ringworld.oblivion.bg> Mail-Followup-To: Mario Sergio Fujikawa Ferreira , freebsd-ports@freebsd.org References: <20010226144045.A27621@Fedaykin.here> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010226144045.A27621@Fedaykin.here>; from lioux@uol.com.br on Mon, Feb 26, 2001 at 02:40:45PM -0300 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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