From nobody Thu Sep 28 03:36:37 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwzfv2dHLz4vRj0 for ; Thu, 28 Sep 2023 03:36:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwzfv1Q71z3XbQ; Thu, 28 Sep 2023 03:36:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695872199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Br8g8Ip0Ys1q+ohVGsIJUHWTPEyC1wFis9rCCLDClc=; b=ZlPlkc0LHULcOOB1GPwMdQ50N86oHy4n1ou5BKqsuH0uHW+FS0zh8IXTDwxFrh44koITL7 stSWIhl41Ql6hGvuGWj9boCerYkqtU5lgLe/w5yFIFcAa9JFrvDXVNylMVw0lQI/Mp7DJo UV+vtKJdV8+ozfEScSOu2Y7+is8PzIWzu/Ge9lAqTWqGItJdfZqPX1VXnt6C4LbBpEP9tP 5SoL8q1QU8P42HAOV3ZDhUym+kGGmWoLKYIHayvtzJAO1BBwm/Ms1RMN1iIClrezeGeWNe ouK7wzBLC7NGwFX/8mJ2jQbZjrv0+sBQE37fejl9Rx1o9AxXV6jl76Sj7Q5JPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695872199; a=rsa-sha256; cv=none; b=g8y0+euY56IZUh1Olukl+xYQ1VxwfAJXCSy/dB7v1+A8oBjVpa3KUHb8FV9kBSUN95lAAr pePyUYrMkTFItqLSHzBiHULfQmnuAyf69nIUnqTJA3Rp2ayqEgPCaNGzKFq3L+LV1qO+4G 80Oxx0hJHKcvtVP28U5GtMjD79zGmyiBngtMfQ1Jq0Scm3g1CVKnhm2BcmckIM0SIvNSM1 4ifJp+2k/JBtVpPrrM4Ns0EWJlgGa8ajOc4yR3Wg8lY9qMiYa273EId5GK0xWrVOtk5FoB zHsKp1pTP7WKZczY1t+XiFmHROhZ8MTT569XjIO+k9+jchgAXNaGubRmBaTL7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695872199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Br8g8Ip0Ys1q+ohVGsIJUHWTPEyC1wFis9rCCLDClc=; b=lUsnRQJF0fL7BcR0sfEacMeh5w6VqPJMjce580yO3+hAAsom+lCYQiKMClV09VKQFhIAZ4 Z+cOxVt27E1Ub12k+pPI6EYfNSV6GS+g4MWO7oTtYt+4htdz5o8DTGWd31+gEutp/pJ+dg xdv4Ck6si6jT/Zqn/yASioBH9ygYiTyeoWH/gxf5Gp9kxFstYSIuMA5zw7eO7mAOorhj8+ U6udpX3i71q2DqG8J7R/jU2zXMxgSCBJgaQNtTRL9L899UCi8wPRSEvUS1McQoVSuKu3fB hkKTqiGncHbLRbgrC/okMaKZ/03GUi+lYy1ec6wQ2zUkCimdU6ZBPc6ngYpm9g== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Rwzft4x5zz1RD2; Thu, 28 Sep 2023 03:36:38 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <2ef23ce1-747e-b722-cc16-358ac043df4d@FreeBSD.org> Date: Wed, 27 Sep 2023 22:36:37 -0500 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: grep(1) bug - duplicate output lines Content-Language: en-US To: Greg 'groggy' Lehey Cc: Jamie Landeg-Jones , freebsd-current@freebsd.org References: <202309280240.38S2esgN015958@donotpassgo.dyslexicfish.net> <8d0658e9-8984-a241-ad1d-e5aa1328d7fa@FreeBSD.org> <20230928033418.GH68731@eureka.lemis.com> From: Kyle Evans In-Reply-To: <20230928033418.GH68731@eureka.lemis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/27/23 22:34, Greg 'groggy' Lehey wrote: > On Wednesday, 27 September 2023 at 22:30:43 -0500, Kyle Evans wrote: >> On 9/27/23 21:40, Jamie Landeg-Jones wrote: >>> When using color=always and a regex of '.' (for example), output lines >>> are duplicated. >>> >>> $ grep --version >>> grep (BSD grep, GNU compatible) 2.6.0-FreeBSD >>> >>> E.G.: >>> >>> $ grep --color=always . /etc/fstab >> >> I think this is what we want: >> >> https://people.freebsd.org/~kevans/grep-color.diff > > That looks surprisingly complicated. FWIW, this issue didn't occur > with older versions of grep. > I added the bug sometime before we went live with bsdgrep, I believe. GNU grep naturally didn't do things quite like this.