Re: [NMOSUG-L] generated a list of leading-zero numbers?

Jody Harris <[email protected]> Tue, 23 Feb 2010 12:31:19 -0700
Newsgroups gmane.org.user-groups.nmlug
Message-ID <[email protected]>
--===============2072679386==
Content-Type: multipart/alternative; boundary=000e0cd70ada42c08a048049998a

--000e0cd70ada42c08a048049998a
Content-Type: text/plain; charset=ISO-8859-1

I wanted extra leading-0's.

I like to give myself 'breathing room.'

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


On Tue, Feb 23, 2010 at 11:47 AM, Nathan Wallwork <owen-d7IEiSbK/[email protected]> wrote:

> Maybe you're overthinking this....
>
> $ seq -w 8 12
> 08
> 09
> 10
> 11
> 12
>
>
> On Tue, 23 Feb 2010, Jody Harris wrote:
>
> > Subject: [NMOSUG-L] generated a list of leading-zero numbers?
> > Date: Tue, 23 Feb 2010 08:48:54 -0700
> > From: Jody Harris <[email protected]>
> > To: New Mexico Linux Users Group Mail List <[email protected]>,
> >     [email protected]
> > X-Original-To: owen-d7IEiSbK/[email protected]
> > Delivered-To: owen-d7IEiSbK/[email protected]
> > Reply-To: [email protected]
> >
> > 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)
> >
> _______________________________________________
> NMOSUG-L mailing list
> [email protected]
> http://mailman.swcp.com/mailman/listinfo/nmosug-l
>

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

I wanted extra leading-0&#39;s.<div><br></div><div>I like to give myself &#=
39;breathing room.&#39;</div><div><br></div><div>j<br><div>----<br>- Think =
carefully.<br>- Contra mundum - &quot;Against the world&quot; (St. Athanasi=
us)<br>

- Credo ut intelligam - &quot;I believe that I may know&quot; (St. Augustin=
 of Hippo)<br>
<br><br><div class=3D"gmail_quote">On Tue, Feb 23, 2010 at 11:47 AM, Nathan=
 Wallwork <span dir=3D"ltr">&lt;<a href=3D"mailto:owen-d7IEiSbK/[email protected]">owen@pu=
ngent.org</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Maybe you&#39;re overthinking this....<br>
<br>
$ seq -w 8 12<br>
08<br>
09<br>
10<br>
11<br>
12<br>
<br>
<br>
On Tue, 23 Feb 2010, Jody Harris wrote:<br>
<br>
&gt; Subject: [NMOSUG-L] generated a list of leading-zero numbers?<br>
&gt; Date: Tue, 23 Feb 2010 08:48:54 -0700<br>
&gt; From: Jody Harris &lt;<a href=3D"mailto:[email protected]">havoc@har=
risdev.com</a>&gt;<br>
&gt; To: New Mexico Linux Users Group Mail List &lt;<a href=3D"mailto:nmlug=
@nmlug.org">[email protected]</a>&gt;,<br>
&gt; =A0 =A0 <a href=3D"mailto:[email protected]">nmosug-l@mailman.=
swcp.com</a><br>
&gt; X-Original-To: <a href=3D"mailto:owen-d7IEiSbK/[email protected]">owen-d7IEiSbK/[email protected]</a=
><br>
&gt; Delivered-To: <a href=3D"mailto:owen-d7IEiSbK/[email protected]">owen-d7IEiSbK/[email protected]</a>=
<br>
&gt; Reply-To: <a href=3D"mailto:[email protected]">nmosug-l@mailma=
n.swcp.com</a><br>
<div><div></div><div class=3D"h5">&gt;<br>
&gt; I sometimes need to generate a list of numbers with leading zeros. Wha=
t&#39;s<br>
&gt; the easiest way to do this at the shell?<br>
&gt;<br>
&gt; I put this together, but it just seems too indirect:<br>
&gt; for id in `for ((i=3D0; i&lt;45; i++)); do echo; done | nl -ba -nrz`; =
do echo<br>
&gt; foo$id; done<br>
&gt;<br>
&gt; jody<br>
&gt; ----<br>
&gt; - Think carefully.<br>
&gt; - Contra mundum - &quot;Against the world&quot; (St. Athanasius)<br>
&gt; - Credo ut intelligam - &quot;I believe that I may know&quot; (St. Aug=
ustin of Hippo)<br>
&gt;<br>
</div></div>_______________________________________________<br>
NMOSUG-L mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]</a><=
br>
<a href=3D"http://mailman.swcp.com/mailman/listinfo/nmosug-l" target=3D"_bl=
ank">http://mailman.swcp.com/mailman/listinfo/nmosug-l</a><br>
</blockquote></div><br></div></div>

--000e0cd70ada42c08a048049998a--

--===============2072679386==
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

--===============2072679386==--