generated a list of leading-zero numbers?

Jody Harris <[email protected]> Tue, 23 Feb 2010 08:48:54 -0700
Newsgroups gmane.org.user-groups.nmlug
Message-ID <[email protected]>
--===============1644695838==
Content-Type: multipart/alternative; boundary=00151750e27ed6e5cd0480467d61

--00151750e27ed6e5cd0480467d61
Content-Type: text/plain; charset=ISO-8859-1

I sometimes need to generate a list of numbers with leading zeros. What's
the easiest way to do this at the shell?

I put this together, but it just seems too indirect:
for id in `for ((i=0; i<45; i++)); do echo; done | nl -ba -nrz`; do echo
foo$id; done

jody
----
- Think carefully.
- Contra mundum - "Against the world" (St. Athanasius)
- Credo ut intelligam - "I believe that I may know" (St. Augustin of Hippo)

--00151750e27ed6e5cd0480467d61
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I sometimes need to generate a list of numbers with leading zeros. What&#39=
;s the easiest way to do this at the shell?<div><br></div><div>I put this t=
ogether, but it just seems too indirect:</div><div>for id in `for ((i=3D0; =
i&lt;45; i++)); do echo; done | nl -ba -nrz`; do echo foo$id; done</div>

<div><br></div><div>jody<br clear=3D"all">----<br>- Think carefully.<br>- C=
ontra mundum - &quot;Against the world&quot; (St. Athanasius)<br>- Credo ut=
 intelligam - &quot;I believe that I may know&quot; (St. Augustin of Hippo)=
<br>


</div>

--00151750e27ed6e5cd0480467d61--

--===============1644695838==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
NMLUG mailing list
[email protected]
http://lists.b9.com/cgi-bin/mailman/listinfo/nmlug

--===============1644695838==--