From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 2FC7E266E8 for ; Sun, 7 Apr 2024 08:36:03 +0200 (CEST) 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:Content-Type:Subject:To:From:Date: References:In-Reply-To:Message-Id:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=t86SgxwLA3NIxnYob/TtOCLh91A14fCnmGp0HtwJixM=; b=YzaHxqAyfAjrHs+sBdB1qjGYoq oU2M8qKIjj/mqbtDUk2y2pZwMqKiJ770nW+Z9wEqra65EVGEE6PGNqNxRV5hbDfrr2C0t3vdILmot tlOrcCXqA+lWecJdtVml9i7mSlZSJYYAs/bGDlmAl3ieAUakq/yWMyi/CI6M0QJumrxnVxv/8lkbW tLT8VdUFwTGvBiN4zO0CAVg1/d6PaseJhiQZ7TaFkDF2JE2ZI6c5T41BBFYeVKef/aYWtkVRP6vNA S8IoTrDvfU4BMfYX+L4GziwhsjG6iZr9jtMQvHuv88QJsQLBwz27b/0KlciGlX1p8wcohDBcHNcX3 n45P7gbQ==; Received: by zero.zsh.org with local id 1rtM8J-000Axg-20; Sun, 07 Apr 2024 06:36:03 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rtM7T-000AIa-ER; Sun, 07 Apr 2024 06:35:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfauth.nyi.internal (Postfix) with ESMTP id 2FE321200066 for ; Sun, 7 Apr 2024 02:35:09 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute2.internal (MEProxy); Sun, 07 Apr 2024 02:35:09 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudegfedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesth dtredtreerjeenucfhrhhomhepnfgrfihrvghntggvucggvghljoiiqhhuvgiiuceolhgr rhhrhihvseiishhhrdhorhhgqeenucggtffrrghtthgvrhhnpeeileevheefgffhffeihe dtieegvdfgkeffteejgfetledtiedviedvteeukeegkeenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihvhdomhgvshhmthhprghuth hhphgvrhhsohhnrghlihhthidqudduhedukeejjedtgedqudduledvjeefkeehqdhlrghr rhihvheppeiishhhrdhorhhgsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D686631A0065; Sun, 7 Apr 2024 02:35:08 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-333-gbfea15422e-fm-20240327.001-gbfea1542 MIME-Version: 1.0 Message-Id: <4d3a1ac0-ae36-4e66-b4f3-56a5d6323b38@app.fastmail.com> In-Reply-To: References: Date: Sun, 07 Apr 2024 02:34:47 -0400 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: zsh-users@zsh.org Subject: Re: piping surprise Content-Type: text/plain X-Seq: 29781 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Fri, Apr 5, 2024, at 4:32 PM, Bart Schaefer wrote: > However, there's a bug (?) in that if you chain together several > commands this way, only the first $((++Pnum)) actually increments the > parameter, so all the commands end up with the same file names. E.g. > > echo foo | tr a-z A-Z | cat > > just prints "foo". And sometimes the parameter is not incremented at all: % (echo foo) | tr a-z A-Z | cat zsh: no such file or directory: /tmp/zshpipe39158.0 zsh: no such file or directory: /tmp/zshpipe39158.0 % cat <<