From unknown Thu Jun 12 08:41:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58416: -u should only affect stdout, not stdin Resent-From: Andras Korn Original-Sender: "Debbugs-submit" Resent-CC: bug-sed@gnu.org Resent-Date: Mon, 10 Oct 2022 16:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58416 X-GNU-PR-Package: sed X-GNU-PR-Keywords: To: 58416@debbugs.gnu.org X-Debbugs-Original-To: Received: via spool by submit@debbugs.gnu.org id=B.16654202526813 (code B ref -1); Mon, 10 Oct 2022 16:45:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Oct 2022 16:44:12 +0000 Received: from localhost ([127.0.0.1]:49699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohvsw-0001ln-MM for submit@debbugs.gnu.org; Mon, 10 Oct 2022 12:44:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:40562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohule-0008Iq-Cv for submit@debbugs.gnu.org; Mon, 10 Oct 2022 11:32:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohuld-0007Q2-6u for bug-sed@gnu.org; Mon, 10 Oct 2022 11:32:33 -0400 Received: from mail-dbaeur03on20706.outbound.protection.outlook.com ([2a01:111:f400:fe1a::706]:61537 helo=EUR03-DBA-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohula-0007is-Ce for bug-sed@gnu.org; Mon, 10 Oct 2022 11:32:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RnMuUELJNYpImp3+EBm36CQ6xT/cY9WZvXEJnrbU0WWfcOsyujZn5NAy9dKc68HuCQ20D7bYpbxImstrMEWZolQ9uhYLTHqyxUGsjCx0aiTdRK/Ttehga/o4qBn5bhXqFdsHK8FiTBzBI1gO6uh/BFSMWrlH6DA/UhP4qSF7FFlKXn3rVeRrSPw0Gv/XUTj3pppbVPjS4uMkpT9+io2icdn5XeFylQ4UJWJ7r4TEYnsbsKUa0m53W7CfpI85qz/l/sVq5Sg1yOZziwX/1unBbuqNaSmekGW+XTg/9qghF7mNWoyWsewfoe3HCO74vjHBBONBHAEtCzTGN7LGiTMC4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fRljYBn5UxjVLr1TJZZPnkqiaJDiNssOYeGn/9gLQe4=; b=YRJWE/SOnCx60aTC8BsDOaDC/w5MV3nkR8bXFV/5kgrpiFeWBrM4zVwCwMUef3eIccTmVWl4cLeZBCTltcVmUL1QJjA2FMt4xUEoplj6Oq81bsY8T1uhJWU5g3OxqSh//CyvusTkjVx1JJHERXPybJ5GVevrlwklAs6PxwPtYoUwe5HqGoqCt2hi0L2p+a4P8MKJzq+ywI4r4ZlfzOzcnY4eFttLPJBpYk74J5fRN45R7wKoTqnuWgt0XxviCAmEkbfy6S1oTaeJ25sHjhrVt9LLX1oyOcbUtSRlonhWsxuPJQ0Yrz8IEy+XJ6v00brbHRh1vIKkcoZFlluVBPtlPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 142.39.206.8) smtp.rcpttodomain=gnu.org smtp.mailfrom=cae.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cae.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cae.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fRljYBn5UxjVLr1TJZZPnkqiaJDiNssOYeGn/9gLQe4=; b=VqxWmIvqHGtivjmxrxDXaNWtBUDOfAEBIWViXc7hmwYeSrYBw8KNwdlRHWxfNRc+nKBVuqzj/vPp3ju7pCcHJIQmdXKCy46hVnYsTMnEP89uJlIWVqQ6u8XgR1qPxzFGBmEkbD22GvYmC3dEell2L4JXVMtSOpgmWftZLPQ9uVEobCPilqwUP/pb9H9CBOdj2p7uhuxwythhSt8uv+LBoT9ltcENqK1Kkcs4hYWx7BHX38vmZt2a1gcDcbEUBgxFYcPX65fOB1N52RYHG374Thl5cL8qARALlyo3uLqoispXENVGHZjy+TfTMrTzMTN4HewyFlqiJF2ub6F+mULRzA== Received: from DB7PR05CA0065.eurprd05.prod.outlook.com (2603:10a6:10:2e::42) by AM7PR09MB4102.eurprd09.prod.outlook.com (2603:10a6:20b:11d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.38; Mon, 10 Oct 2022 15:27:25 +0000 Received: from DBAEUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2e:cafe::67) by DB7PR05CA0065.outlook.office365.com (2603:10a6:10:2e::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.40 via Frontend Transport; Mon, 10 Oct 2022 15:27:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 142.39.206.8) smtp.mailfrom=cae.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=cae.com; Received-SPF: Pass (protection.outlook.com: domain of cae.com designates 142.39.206.8 as permitted sender) receiver=protection.outlook.com; client-ip=142.39.206.8; helo=caeedge.cae.com; pr=C Received: from caeedge.cae.com (142.39.206.8) by DBAEUR03FT052.mail.protection.outlook.com (100.127.142.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5709.10 via Frontend Transport; Mon, 10 Oct 2022 15:27:24 +0000 Received: from prdexc01.corproot.cae.com (142.39.219.105) by caeedge.cae.com (142.39.206.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2242.4; Mon, 10 Oct 2022 11:29:19 -0400 Received: from CAEMBX08.caecorp.cae.com (142.39.219.110) by prdexc01.corproot.cae.com (142.39.219.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2242.12; Mon, 10 Oct 2022 11:27:23 -0400 Received: from cae-engineering.hu (10.85.55.254) by CAEMBX08.caecorp.cae.com (142.39.219.110) with Microsoft SMTP Server (TLS) id 15.0.1497.38 via Frontend Transport; Mon, 10 Oct 2022 11:27:22 -0400 Date: Mon, 10 Oct 2022 17:27:20 +0200 From: Andras Korn Message-ID: <20221010152720.ha5yn3o47g3fnu47@cae-engineering.hu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBAEUR03FT052:EE_|AM7PR09MB4102:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ce95329-2466-4eed-a1da-08daaad3ee8a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LB7sQu1qGDoM36GsfYMiAgJOwoVAVjW03F0iTP6ikX4zdBSTQQGmpRq6vkl1Umg/opbhlEQIWGaoQgOj6K7MNXmvVyvLSrIUbMQJwo6WrnmBodRXT3xmnI5w6OuhXeRs4BxLvYD5XGO9ULSN+qOY6ZjB6A8pL4vBmTI67u7+/LLJ+LqkcKct80qOjKS1txs6MG50T5HFa9ngXjut8tpo8Of2YoJ4O+nRymSV073cBOAqqIGC6W/YUladROPXr5PIi+F4wwY1YFCYAubnQiDmTq81EMntKVD6i4crIXnpIK8haqA3Drafd0hq/h9w4Nu+9ibTS6qtzCD6GZV4i2zhSU2hzfq/lJ536W4vaLCNhXp2PwKCJ+z4PUmz6OmyDcIgJfvz2oHOz3WqIHb+6bgpKh6sAjWyBb5yb7Fgdd+H9xJfPj8tMzghgxDhGdG4L99b1Yoad5WoBcQGIitT9GqIS5P0XB/qyhjeC9Ii3nqo/36P+lK/G3gGJzzV9vXSju6wO5idj9W9gN9hOHvQRo0IROnYmwaWjn0x4jsY48P7mR7b28UuM0Xvd6sN6c2tKz+PkXi+EtxUIAr/wUgogxq6xl5Huq/DMYjIw4nGfvaHqNCOD4HGtWsgPQCc/h5dTamu6d5D3WCxLPVLXWiig6teBOMYK0B/82E+wXALtbtndX8mG6m2jFH0zXku/AJAdWXNAhkb/qspN4NyQ0vOws4c6V/S53GrN4FbDcBG72jbKUYY6f/LAv93FxeNF871tzacptB8nmico6J7x3HuCPb1YpaUotAxV8R0QNpsl/dxrKw= X-Forefront-Antispam-Report: CIP:142.39.206.8; CTRY:CA; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:caeedge.cae.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(396003)(346002)(39860400002)(136003)(376002)(451199015)(36840700001)(40470700004)(46966006)(1076003)(55016003)(82310400005)(82740400003)(316002)(81166007)(40480700001)(36860700001)(86362001)(356005)(8676002)(40460700003)(70206006)(70586007)(36756003)(6916009)(4744005)(44832011)(426003)(8936002)(41300700001)(186003)(5660300002)(478600001)(47076005)(9686003)(336012)(2906002)(26005)(7696005)(36900700001); DIR:OUT; SFP:1102; X-OriginatorOrg: cae.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2022 15:27:24.0887 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ce95329-2466-4eed-a1da-08daaad3ee8a X-MS-Exchange-CrossTenant-Id: 006c1e48-e342-47e9-ab5d-0dd9ff89bd96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=006c1e48-e342-47e9-ab5d-0dd9ff89bd96; Ip=[142.39.206.8]; Helo=[caeedge.cae.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT052.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR09MB4102 Received-SPF: pass client-ip=2a01:111:f400:fe1a::706; envelope-from=korn-gnu.org@elan.rulez.org; helo=EUR03-DBA-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Mailman-Approved-At: Mon, 10 Oct 2022 12:44:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi, I just straced a running sed(1) instance (4.8), and was amazed to see it read its input character by character. I then remembered that I called it with '-u' because its output was being read by a program that needed it ASAP. I can't see any benefit to reading stdin by the character, but am prepared to believe a use-case exists. However, I submit that not all use-cases that require unbuffered (or line-buffered) output also automatically need inefficient reading of the input. Maybe add a new switch for the input part? Thanks and best regards, AndrĂ¡s -- Klein bottle for rent; enquire within.