Date: Sat, 11 Dec 2010 10:06:23 -0800 From: Charlie Kester <corky1951@comcast.net> To: freebsd-questions@freebsd.org Subject: Re: bash increment in a given way Message-ID: <20101211180623.GI11485@comcast.net> In-Reply-To: <20101211175708.GH11485@comcast.net> References: <485300.96624.qm@web121409.mail.ne1.yahoo.com> <20101211175708.GH11485@comcast.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101211180623.GI11485>