From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25926 invoked from network); 12 Sep 2022 05:38:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Sep 2022 05:38:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1662961087; b=IeKGpu7xgkNU/COQWn33swMc81BUKnP6/nKbGCxzEl1scg+I0YvwlpazCzeDcUJVNgAdZFkALF ScfR8trI8BxKBdZ2Eewc92z2ibxMOcS3dUJeHgv2biW/4Zkvc3WbJkI61fwmAqOBQMSO5UyelO UKWZW+qy63kqd6kf2QT52zNvJ4G+Ycf6XFqHnLR5sG3416Mdu4lNuKcrI4eND27cFxVt9Xe0Oe hovvQcLaZZdiqL/+N8CvhTp+l1WZXxk9KzAHn8rZxlfZuhFEyoOHwwIszwBfX5T/qJE0ol8Ip1 +1kWXMt9hcGagZk8JsippFJqaNavWBG8EX3nJelt4Neg1w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd01008-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.24; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1662961087; bh=fFQpQxKlqmngE5hAgSgprmT3SP4xWKpDGjy4oqYgGt4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:In-Reply-To:To:References:Date:Subject: MIME-Version:Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=IBL7msceFSy9D58tZsnLBgH6oC6oJG/7hi37e/KBHVJmYnKb2WjG7uyOUh5kGdIzF2MR2v1WIq M6xW0RPu+Tymf6VjrBnp9jB1+jMfQgpI2QZEXmn+ksf9FJugNemURij087D9ryR96Vx6J1alsM Z2KlsbBK7mDGQY/F4YdQ+HgrwPPJzoOkprmh3zEVMy34ZGQhJ/n9sGtw1cyctEsvHEgx8Sok5H iLSxL74/CHsrJ2aKA/nra9V6zhoUPfY4h29W9QuRy0C5PwecsLqtk58l4IbXY0N8++Gm481dpW e/h7xn7hok0+kimaIVcQvOplXmgj22fzZMTJe4wdLiZalw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-Id:In-Reply-To:To:References: Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=px77x+neLE5GAEkhGyQVdkNFNbQMaooe1P0uEaBmvEA=; b=MMvUXr0fY7xfV0IVceJfWJv9+b x5Yb/3OjebCyz5Pzs2sIfFuHBkN8bvVvEUzkyVWsYJEq2D9YaLMAY9MndBDkiQ36tCtFj3akCJVk4 DAV5J4qPZNDVs7laG5LofFoLm4Ls2wTHfI+Fx/p1Bm7bb8w4IUkl7JPUng6sLd5IuyG0odbKo6OKl kEEuGHtQWA7fAGp5+1CBpB9pLEW9LKZWJACHNCDLCwTd35HYSIiMD3zLlMXF/4Pki2jSFwQ3ertnK zFvtAq/O+dm+KIUBLODX2MdO1fjy3Kbivdv8rsp4QDIiBaX5Aytf4FoC5lfATGga+aAAIPoyXPBIR ph0Quhsw==; Received: from authenticated user by zero.zsh.org with local id 1oXc90-000KKp-ER; Mon, 12 Sep 2022 05:38:06 +0000 Authentication-Results: zsh.org; iprev=pass (snd01008-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.24; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd01008-bg.im.kddi.ne.jp ([27.86.113.24]:21505 helo=dfmta1017.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oXc3r-000JtH-Ho; Mon, 12 Sep 2022 05:32:49 +0000 Received: from mail.biglobe.ne.jp by omta1017.biglobe.ne.jp with ESMTP id <20220912053241694.CGEY.3820.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Mon, 12 Sep 2022 14:32:41 +0900 From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: Deprecation of egrep Date: Mon, 12 Sep 2022 14:32:40 +0900 References: To: zsh-workers@zsh.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.104.21) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 50622 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: > 2022/09/11 2:26, Ellenor Bjornsdottir wrote: >=20 > grep from which system? GNU? GNU grep-3.8. At least Debian-sid and the latest Arch Linux already use = it. > 2022/09/11 1:04, Vin Shelton wrote: >=20 > Changing all occurrences of "egrep" to "grep -E" in our test scripts = will fix this. It works on Linux, {Free,Open,Net,Dragonfly}BSD, macOS and Cygwin. But I'm not sure if it works on Solaris (and other commercial UNIXes) or = not. Online Solaris manpage indicates that /usr/bin/grep does not accept -E (although /usr/xpg4/bin/grep accepts it). Could someone test on Solaris etc.? > 2022/09/11 9:10, Bart Schaefer wrote: >=20 > A quick check reveals six uses, all of which could be replaced with > zsh pattern matching=20 If we can not simply replace egrep by 'grep -E', this would be the = simplest fix; see the patch below. configure sets EGREP to either 'grep -E' or 'egrep', so propagating this to ztst.zsh (in some way) would be another (more complex) possibility. diff --git a/Test/ztst.zsh b/Test/ztst.zsh index aca275c1c..248180b34 100755 --- a/Test/ztst.zsh +++ b/Test/ztst.zsh @@ -94,6 +94,14 @@ tail() { command tail "$argv[@]" } =20 +# Define our egrep (works only as a pipe). GNU grep-3.8 forces us to = use +# 'grep -E' instead of egrep, but on some systems grep may not accept = -E. +egrep () { + while read line; do + [[ $line =3D *(${~1})* ]] && print $line + done +} + # The source directory is not necessarily the current directory, # but if $0 doesn't contain a `/' assume it is. if [[ $0 =3D */* ]]; then