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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23120 invoked from network); 19 Jan 2023 14:52:31 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Jan 2023 14:52:31 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674139951; b=mgD7IrE5mE6bE8jQ7dNB6Jez9Ak7+sKmAsQIiecCRVGjsFUWJhXInGhySmhs5PEshCrXpZcesr J2nU5ca/l9Tu7nBS3DqiP2Ot9QJRKjIQ4j+948frN2u9Cs+9rTJMue55+bfw3kBY3l8Y+Cq0Pq xZxdMZHOY0YbLOA5LoWB7bm6extZZdpnpuk697yhqHvkkkkEqatQ/4R7U/CRQq6REQtDsYUyzG qrVxd8vIYydfm35I+yks3DtG5zwkkdWiiDhqMf4TzfK9REotMmw7egyjPwS6szePmEawZ9PJty gbNOk/IwluYvsj2z96oMuRrZcSNDnvTSwRUz5Cuv954zPQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mailb2.tigertech.net) smtp.remote-ip=208.80.4.154; dkim=pass header.d=blaatscaahp.org header.s=2.tigertech header.a=rsa-sha256; dmarc=pass header.from=blaatscaahp.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1674139951; bh=LKw2MOgDnt7N0f/Z8YI4Q2aAsmF6tt9PWNmRKykX0CM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:References:In-Reply-To:Subject:Cc:To:From:Date:Message-ID: DKIM-Signature:DKIM-Signature; b=lP/7s1MyuBfN9746Ldeekj+qKoka++t3lSepPy8tsyYnimKGKg4S4eCWYU7Y8KF2jC5bI7ypuT e2oGJUWYehkMfIMjr3/nLKhZ+oEhIJyWA2Qj/z/aIJ9YAjvTCs1xrxzUUAhkxcuTxeDjFUZWMq TyGs6C1aMZzEXeJymhW8XrdC63qwCtVzHq3rmvkRAG2EpvJsmzFzJpJqGD8SqimJe39naAPgkW 38JlnoIdqlN9otKX0z5/0GSmREfWT2UBK5FrprqQ3dUpDJLaRPITeDo912i4o1tW7I+4xcV8gT KtdTTdKWI/unGrO67lj77qFGGaxHh6bJ45lhdoTmU1410Q==; 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:References:In-Reply-To:Subject:Cc:To: From:Date:Message-ID:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=aeH+BcXWVcahRBiPjEcddaOqt6VijG0qdvLJSWF8tSc=; b=j9Dz3ZFbIak7xqdx3lOircpHun Ozq7/WnP4GBlDfyh6QzdxprYiyhwaMYzBJZV552NwpKAyUiFrQPU6pFC5zi0hvujtTdd1c6EIdGHV X/wGHgjVniOYjotyijEXW8dusTikgTVonn3kQGPJQIzqZvvlRCuY7MqoVHxC+XSS5n9RwAk1prfG7 UCpY+4tfv7Q/7kj6B9lY8ANYYjy0lwlCTcsPIRXbZCWf6EduQ3IePqVAzBXQ3KSQWTmKKTKIJ7aDa 7mxQYsYMjmZP72agC/o5iUU2muLWZeb9RUFO5cMcNIkDbgIFZCcoZG825p4OoUIXfTBqylcQtQh/d /RmJ6hQg==; Received: by zero.zsh.org with local id 1pIWHF-000Kqj-4I; Thu, 19 Jan 2023 14:52:29 +0000 Authentication-Results: zsh.org; iprev=pass (mailb2.tigertech.net) smtp.remote-ip=208.80.4.154; dkim=pass header.d=blaatscaahp.org header.s=2.tigertech header.a=rsa-sha256; dmarc=pass header.from=blaatscaahp.org; arc=none Received: from mailb2.tigertech.net ([208.80.4.154]:40849) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pIWGU-000K4Y-PD; Thu, 19 Jan 2023 14:51:44 +0000 Received: from localhost (localhost [127.0.0.1]) by mailb2.tigertech.net (Postfix) with ESMTP id 4NyQZ362tBz1pMS1 for ; Thu, 19 Jan 2023 06:51:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blaatscaahp.org; s=2.tigertech; t=1674139899; bh=aeH+BcXWVcahRBiPjEcddaOqt6VijG0qdvLJSWF8tSc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=p/Ges9JHK5OiAIpv3T4iTuQ9pXSX//1d/1F8O6BhytfoPPvn4wdBc4SWwcJJBN1t+ P7+cLJIrMkId1uROh/M3OpES/+udQgAkbI0W/8/PacVmzrZnTDyfuRVW7C9PAUztBY KZ7QraQke6e01CNW5v64Kkb7NsiuAhUbIYEM4es4= X-Quarantine-ID: <3YY6mysYotNN> X-Virus-Scanned: Debian amavisd-new at b2.tigertech.net Received: from localhost (cst-prg-89-91.cust.vodafone.cz [46.135.89.91]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailb2.tigertech.net (Postfix) with ESMTPSA id 4NyQZ24yWGz1pMNN for ; Thu, 19 Jan 2023 06:51:38 -0800 (PST) Received: by thinkcrap.localdomain (Postfix, from userid 1001) id 0FFC235546A; Thu, 19 Jan 2023 14:51:36 +0000 (UTC) Message-ID: Date: Thu, 19 Jan 2023 14:50:22 +0000 (UTC) From: zeurkous@blaatscaahp.org To: Roman Perepelitsa Cc: dominik.vogt@gmx.de, Zsh Users Subject: RE: Re: repeat count? In-Reply-To: References: User-Agent: 822_dng. X-Seq: 28661 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 Mon, 16 Jan 2023 19:49:39 +0100, Roman Perepelitsa wrote: > On Mon, Jan 16, 2023 at 7:31 PM wrote: >> >> On Mon, 16 Jan 2023 19:05:21 +0100, Dominik Vogt wrote: >> > Is it possible to get the pass number of a repeat loop from within >> > the loop, or is it necessary to use a hand written counter? >> > >> > repeat 10; do >> > echo "pass number ???" >> > done >> > >> >> Dunno, but one alternative is-- >> >> for a in {0..9}; do >> echo "pass number ${a}"; >> done; > > Be aware that this is a lot slower if you are iterating many times and > care about the performance of the loop. Yes, due to the text processing involved. But in a crunch, it can do. --zeurkous. > Roman. -- Friggin' Machines!