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 8354 invoked from network); 12 Sep 2022 07:36:25 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Sep 2022 07:36:25 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1662968185; b=NjhYfqdgeQoNLQKsvLuc0CJPdfdKlAInjDb1/JPMqo1K2wgTMxUv4LzjE6zuU9jiV35kbjahBt DXV7ELQbEJaR5/vYF0F2/osTByJOAqF4zCieC0v7s5uzPNhwWdXWPglSMR69hzvR3UrIDoa6qL Q8viwqUFZ7tnik0o2Msm3VXmxbL+D36mwRw91IffoBBJseCNo2HjxBcp2ohwh11iKF4t6Eb8uC OTphObxsgvajh0BbRqPPEL6ZjxwHKhZReF1yO2X7WBHOyfV2cu8FLiYsB6lVpeGeyL3qM3e7ft gbw/YAveWQKmr343IyCNeRCzYnm5fhpwxF33Q47tF0/U/g==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00009-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.9; 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=1662968185; bh=OI/mkdH2bReJovo6a6tgsflsAi/+4VlHnmO+/Lb8zAQ=; 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=joJoPrwbU9RhMHkSaFH/6VzhDS1pDNiy2wIWbdVbDkaptawylOhotgEcjRGY6o9TiKzeg8dInz AG4hLtkPlL3BOg5OVG4U5RNsfUcFFArEue77ENJSkhVuZp2/YrvyrdWbGtv60f2Uj2dk92pei5 6qDnN+8YeTFGq45mpuYXonfoXYx25YHKJmm2/LoQ3a6Rsszb+zZK8fzdgPVtA1tMhurjUDSnVQ ARFQcPaqDA9TayEC7ySds3tuu7v3BHjVSEfOlOfsUmkN0tbkYlpZb6GZBr5o2SrBX8ystjE1ee Sw54iS8C53NM7xAfU/uAxk/YkwupPq+qDaprw8VTFlqbBQ==; 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=/BQDYs8LPUXx8uLuwbNthl9a/FIVOX3ySnSG1pG4SdI=; b=kd+6aAK+1qMO0PKXucoH/ozsb9 Xm2C2VGBS0y1zLpKDD4LVYcGEZVQb3ZGHgBUCqycfvsgvPW+QCErbsBodVI/HnxDtZYkg7jtCyBpd HtDtahFYMxIRS3wfV/+pTPZxO7SUk32nCwJFZNyZ7/SH6/ZDgoDN+xL2Gc0B7+mWZymZyRKqikCeL FNbN7UZdfRieDnJC2tpiSi8kuKS9FNOcbwgQUohn4XGyTaRK8AluiOnMk2ewGC8m+6i6Pu4VAd0fi ENxaonYYjjH3jpZUf9gXeAqlB7SawL9UiPysrCLPo7mYsrfGjioK7z2OS890E39A/14mIVuaRvq9i Swkw7m7A==; Received: from authenticated user by zero.zsh.org with local id 1oXdzT-000OkQ-PN; Mon, 12 Sep 2022 07:36:23 +0000 Authentication-Results: zsh.org; iprev=pass (snd00009-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.9; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00009-bg.im.kddi.ne.jp ([27.86.113.9]:57345 helo=dfmta0018.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oXduM-000OGb-Ac; Mon, 12 Sep 2022 07:31:07 +0000 Received: from mail.biglobe.ne.jp by omta0018.biglobe.ne.jp with ESMTP id <20220912073058811.WBXE.104970.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Mon, 12 Sep 2022 16:30:58 +0900 From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: Deprecation of egrep Date: Mon, 12 Sep 2022 16:30:58 +0900 References: To: zsh-workers@zsh.org In-Reply-To: Message-Id: <8D43BA5A-84FD-4737-8009-059430DD039E@kba.biglobe.ne.jp> X-Mailer: Apple Mail (2.3445.104.21) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 50623 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/12 14:32, I wrote: > If we can not simply replace egrep by 'grep -E', this would be the simplest > fix; see the patch below. Sorry, I forgot 'local line': diff --git a/Test/ztst.zsh b/Test/ztst.zsh index aca275c1c..d0e779f94 100755 --- a/Test/ztst.zsh +++ b/Test/ztst.zsh @@ -94,6 +94,15 @@ tail() { command tail "$argv[@]" } +# 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 () { + local line + while read line; do + [[ $line = *(${~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 = */* ]]; then