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's.<div><br></div><div>I like to give myself &#= 39;breathing room.'</div><div><br></div><div>j<br><div>----<br>- Think = carefully.<br>- Contra mundum - "Against the world" (St. Athanasi= us)<br> - Credo ut intelligam - "I believe that I may know" (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"><<a href=3D"mailto:owen-d7IEiSbK/[email protected]">owen@pu= ngent.org</a>></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'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> > Subject: [NMOSUG-L] generated a list of leading-zero numbers?<br> > Date: Tue, 23 Feb 2010 08:48:54 -0700<br> > From: Jody Harris <<a href=3D"mailto:[email protected]">havoc@har= risdev.com</a>><br> > To: New Mexico Linux Users Group Mail List <<a href=3D"mailto:nmlug= @nmlug.org">[email protected]</a>>,<br> > =A0 =A0 <a href=3D"mailto:[email protected]">nmosug-l@mailman.= swcp.com</a><br> > X-Original-To: <a href=3D"mailto:owen-d7IEiSbK/[email protected]">owen-d7IEiSbK/[email protected]</a= ><br> > Delivered-To: <a href=3D"mailto:owen-d7IEiSbK/[email protected]">owen-d7IEiSbK/[email protected]</a>= <br> > Reply-To: <a href=3D"mailto:[email protected]">nmosug-l@mailma= n.swcp.com</a><br> <div><div></div><div class=3D"h5">><br> > I sometimes need to generate a list of numbers with leading zeros. Wha= t's<br> > the easiest way to do this at the shell?<br> ><br> > I put this together, but it just seems too indirect:<br> > for id in `for ((i=3D0; i<45; i++)); do echo; done | nl -ba -nrz`; = do echo<br> > foo$id; done<br> ><br> > jody<br> > ----<br> > - Think carefully.<br> > - Contra mundum - "Against the world" (St. Athanasius)<br> > - Credo ut intelligam - "I believe that I may know" (St. Aug= ustin of Hippo)<br> ><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==--