Re: [Nolug] Lists in bash

From: Craig Jackson <craig.jackson_at_wild.net>
Date: 13 Feb 2003 09:53:41 -0600
Message-Id: <1045151621.12779.27.camel@rhino>

Ron and Andrew,
Thanks. I didn't know about seq. It came in handy today. That's what I
love about Unix -- learn something new every day.
Craig

On Wed, 2003-02-12 at 21:41, Ron Johnson wrote:
> On Wed, 2003-02-12 at 21:38, Andrew S. Johnson wrote:
> > Try this:
> >
> > $ seq --help
>
> Now *that* is the way to do it... And a heck of a lot more versatile
> and light weight than perl.
>
> > Usage: seq [OPTION]... LAST
> > or: seq [OPTION]... FIRST LAST
> > or: seq [OPTION]... FIRST INCREMENT LAST
> > Print numbers from FIRST to LAST, in steps of INCREMENT.
> >
> > -f, --format FORMAT use printf(3) style FORMAT (default: %g)
> > -s, --separator STRING use STRING to separate numbers (default: \n)
> > -w, --equal-width equalize width by padding with leading zeroes
> > --help display this help and exit
> > --version output version information and exit
> >
> > If FIRST or INCREMENT is omitted, it defaults to 1.
> > FIRST, INCREMENT, and LAST are interpreted as floating point values.
> > INCREMENT should be positive if FIRST is smaller than LAST, and negative
> > otherwise. When given, the FORMAT argument must contain exactly one of
> > the printf-style, floating point output formats %e, %f, or %g.
> >
> > Report bugs to <bug-sh-utils@gnu.org>.
> > $ seq 1 10
> > 1
> > 2
> > 3
> > 4
> > 5
> > 6
> > 7
> > 8
> > 9
> > 10
> >
> > Not bash native, but it's still pretty easy.
> >
> > Andy Johnson
> >
> > ___________________
> > Nolug mailing list
> nolug@nolug.org
> --
> +------------------------------------------------------------+
> | Ron Johnson, Jr. Home: ron.l.johnson@cox.net |
> | Jefferson, LA USA http://members.cox.net/ ron.l.johnson |
> | |
> | "For me and windows it became a matter of easy to start |
> | with, and becoming increasingly difficult to be produc- |
> | tive as time went on, and if something went wrong very |
> | difficult to fix, compared to linux's large over head |
> | setting up and learning the system with ease of use and |
> | the increase in productivity becoming larger the longer I |
> | use the system." |
> | Rohan Nicholls , The Netherlands |
> +------------------------------------------------------------+
>
> ___________________
> Nolug mailing list
> nolug@nolug.org

-- 
Craig Jackson
__________________________
Wildnet Group LLC
103 North Park, Suite 110
Covington, Lousiana 70433
Office 985-875-9453
__________________________
___________________
Nolug mailing list
nolug@nolug.org
Received on 02/13/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST