SLUG Mailing List Archives
Re: [SLUG] padding digits on counting loops, how ?
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] padding digits on counting loops, how ?
- From: Peter Hardy <peter@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 02 Aug 2004 08:35:55 +1000
- User-agent: Mozilla Thunderbird 0.7.1 (X11/20040715)
On 08/02/04 08:17, Voytek wrote:
Peter Hardy said:
On 08/02/04 01:26, Voytek wrote:
how can I allow for leading zero for days 1-9 in below example:
while [ $i -lt $n ]; do
Replace the while loop with a for loop using seq(1) to generate the
sequence. Use the -w option to pad:
for $i in `seq -w 1 32`; do
how do I initialize 'i'..?:
Oh, dang, that was supposed to be i not $i.
I guess it was a little past my bedtime. :-(