From nobody Sun Jun 18 22:14:52 2023 X-Original-To: bugs@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 4QknJF4Qgvz4fVcs for ; Sun, 18 Jun 2023 22:14:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QknJF127Lz4bhX for ; Sun, 18 Jun 2023 22:14:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687126493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dMoa/gPUBiZp4vktSrhHjGam5D3mtdeb8FiqrxTEfYU=; b=NiBFN0V6hF2F9OY5C+ZAY5j1LRsE4WUeXs3Kz0ndf8xrIaSvbuRtVByFbMcg3ZuistoU49 qTwBfEw/BoJE3St0tuFCKnr8zRFmhk4NJJMYTVPaetJEHwrg1FxrGBt1nqLmIxwbBBpjZD yKtWr/7dxThQZswu5g9kfnewOGL6zZQM7UKlv3DDp9sBGOkm24zwfk0coQfv635usHMNg/ ZVgMUJcJ0978IBR03kpO9lZrKYaApvOOkABC/EPylDLRF7DqeX0Ep5w/pJSwAheiINBCL4 89enMuQc3LRH68+cKUGii8c1ZKvQ/wl8SinMVjlSNfKeXwdYvdXP5HZP/8Y15w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687126493; a=rsa-sha256; cv=none; b=MFr9XLRWflKBwcAA90ZcirIcJaZbr6i3txg/4F8DBZEXxFPkT5B5J/sryK4TwCBnP6MabA GMxbOlyZPM63TBlXJF6U77DWSm+0wafZHi5ui0+nKjJj8tfbaD/cK9R9VuCgakEjiPoA/5 9piKlhL42G7ezuKh4BDpGq0Q9N3e96QIuRb1FhxIPJ99bbp11+NHv0sS8lnH9kQtEiKwm1 5+lGGfta6Bbc7tNACd7yRLmGoKI/OMLB+RTzJKMz7O/eWQ4uNeobnYQStVDyLqBOMpjO+g ScAtdLCD3KdF4p5W4JFiXhHNjhbo73SzsfssHUzRhfHu45EcumHZEcTTQXlXMg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QknJF01WwzsB2 for ; Sun, 18 Jun 2023 22:14:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 35IMEqIw046254 for ; Sun, 18 Jun 2023 22:14:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 35IMEqOq046253 for bugs@FreeBSD.org; Sun, 18 Jun 2023 22:14:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271817] sed: range change with N results in no output Date: Sun, 18 Jun 2023 22:14:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: andrew@tao11.riddles.org.uk X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271817 --- Comment #3 from Andrew "RhodiumToad" Gierth --- (In reply to Mohamed Akram from comment #2) All of the pattern space (embedded newlines and all) is deleted at the end = of each cycle (after being output if appropriate). The fact the GNU sed violates the spec is not our concern. Your description of the "c" command is not what the spec says. The spec says that with 2 addresses, "c" deletes the pattern space if the line is in the addressed range, and emits the replacement text if and only if the last lin= e of the range is addressed. Since the "b" line is consumed by N and is never in= the pattern space at the start of the cycle, the /a/,/b/ range never sees it, so the range extends to the last line of the file; but since you also read the last line of the file by doing N on the second-last line, the last line is = also never processed by the "c" command so the replacement is never output. (You seem to be assuming that the use of N does not affect addresses; that's not what the spec says.) --=20 You are receiving this mail because: You are the assignee for the bug.=