Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2006 21:50:46 +0200
From:      usleepless@gmail.com
To:        "Bill Moran" <wmoran@collaborativefusion.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Shell ( csh, sh ) scripting and seq-command
Message-ID:  <c39ec84c0603291150q61988e7fg75f0fe5488f932da@mail.gmail.com>
In-Reply-To: <20060329142754.a7488302.wmoran@collaborativefusion.com>
References:  <c39ec84c0603290953n2819ef36j30d523537a093827@mail.gmail.com> <c39ec84c0603291043u3557ffa9rb4331ba8d3009cd6@mail.gmail.com> <20060329135713.cec7dbd1.wmoran@collaborativefusion.com> <c39ec84c0603291113k3dbe2d92lb81013f8725c5942@mail.gmail.com> <20060329142754.a7488302.wmoran@collaborativefusion.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> You
> should be able to write a shell script

as i stated in my message, i lack shell scripting experience.

> that wraps jot and provides
> its functionality in the same format as seq.

yes, and to convert steps to reps you will need $reps =3D ($end -
$start) / $steps, and then see the difference between your script and
the output of an actual linux seq.

for example:
   seq 1 2 60 gives 1..3..5..7..59 ( see also my php and csh implementation=
s )

a seq equivalent ( 3 par version ) would be:

@ reps =3D ( $3 - $1 ) / $2
jot $reps $1 $3

which will give 1..3..5..7..9..12(!)..zzzz..60


so how would your implementation of seq by using jot look like?

regards,

usleep


On 3/29/06, Bill Moran <wmoran@collaborativefusion.com> wrote:
> On Wed, 29 Mar 2006 21:13:24 +0200
> usleepless@gmail.com wrote:
>
> > jot !=3D seq
>
> Equivalent, no.  But it does offer comparative functionality.  You
> should be able to write a shell script that wraps jot and provides
> its functionality in the same format as seq.
>
> --
> Bill Moran
> Collaborative Fusion Inc.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c39ec84c0603291150q61988e7fg75f0fe5488f932da>