From owner-freebsd-questions@FreeBSD.ORG Sat Dec 11 18:06:27 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01A73106564A for ; Sat, 11 Dec 2010 18:06:27 +0000 (UTC) (envelope-from corky1951@comcast.net) Received: from qmta08.emeryville.ca.mail.comcast.net (qmta08.emeryville.ca.mail.comcast.net [76.96.30.80]) by mx1.freebsd.org (Postfix) with ESMTP id DBCB78FC0C for ; Sat, 11 Dec 2010 18:06:26 +0000 (UTC) Received: from omta14.emeryville.ca.mail.comcast.net ([76.96.30.60]) by qmta08.emeryville.ca.mail.comcast.net with comcast id htrf1f0021HpZEsA8u6Ss5; Sat, 11 Dec 2010 18:06:26 +0000 Received: from comcast.net ([98.203.142.76]) by omta14.emeryville.ca.mail.comcast.net with comcast id hu6Q1f0091f6R9u8au6QcH; Sat, 11 Dec 2010 18:06:26 +0000 Received: by comcast.net (sSMTP sendmail emulation); Sat, 11 Dec 2010 10:06:23 -0800 Date: Sat, 11 Dec 2010 10:06:23 -0800 From: Charlie Kester To: freebsd-questions@freebsd.org Message-ID: <20101211180623.GI11485@comcast.net> Mail-Followup-To: freebsd-questions@freebsd.org References: <485300.96624.qm@web121409.mail.ne1.yahoo.com> <20101211175708.GH11485@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20101211175708.GH11485@comcast.net> X-Mailer: Mutt 1.5.20 X-Composer: Vim 7.2 User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: bash increment in a given way X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Dec 2010 18:06:27 -0000 On Sat 11 Dec 2010 at 09:57:08 PST Charlie Kester wrote: >On Sat 11 Dec 2010 at 06:34:20 PST S Mathias wrote: >>It's ok, that i can use this, when i want an incrementing sequence, in a given way: >> >># {START..END..INCREMENT} >>$ for i in {0..10..2}; do echo "Welcome $i times"; done >>Welcome 0 times >>Welcome 2 times >>Welcome 4 times >>Welcome 6 times >>Welcome 8 times >>Welcome 10 times >>$ >> >>but what's the "magic" for this? : >> >>$ MAGIC; do echo "Welcome $i times"; done >>Welcome 0 times >>Welcome 1 times >>Welcome 4 times >>Welcome 5 times >>Welcome 8 times >>Welcome 9 times >>$ > >man jot(1) Or maybe not. It's still morning here and the coffee hasn't kicked in yet. I usually reach for jot when constructing loops that look like yours, but on second glance I'm not sure it can produce the output you want.