From owner-freebsd-questions@FreeBSD.ORG Wed Mar 29 20:31:16 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B60CA16A41F for ; Wed, 29 Mar 2006 20:31:16 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0801B43D48 for ; Wed, 29 Mar 2006 20:31:15 +0000 (GMT) (envelope-from usleepless@gmail.com) Received: by zproxy.gmail.com with SMTP id f1so232129nzc for ; Wed, 29 Mar 2006 12:31:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gPM3qdl0WU+HX8DTgsHcmmxD5ygGDpBiH45K/fygPJc9+/Y9uX40KjyTte8xU3sr7nxo6j7lcCeUxz1rb/A/ouL/Pjz74SFpL7ug5QW/LVZg35a6wkMEeLtykM8eVjqSSeIGwrW877+hyyHYx6stqwkTZ5qKUtDnyNs6vFaVYN8= Received: by 10.36.77.17 with SMTP id z17mr1496646nza; Wed, 29 Mar 2006 12:31:15 -0800 (PST) Received: by 10.36.154.7 with HTTP; Wed, 29 Mar 2006 12:31:15 -0800 (PST) Message-ID: Date: Wed, 29 Mar 2006 22:31:15 +0200 From: usleepless@gmail.com To: "Dan Nelson" In-Reply-To: <20060329201616.GA42429@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060329135713.cec7dbd1.wmoran@collaborativefusion.com> <20060329142754.a7488302.wmoran@collaborativefusion.com> <20060329201616.GA42429@dan.emsphone.com> Cc: freebsd-questions@freebsd.org, Bill Moran Subject: Re: Shell ( csh, sh ) scripting and seq-command X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2006 20:31:16 -0000 Dan, Bill, thank you, my bad for not reading the manpage thoroughly enough. i was put off by reps being the first parameter, and interpreted [s] ( stepsize ) as being the separator string, and assumed there was no stepsize. sorry for the fuzz, but at least i upped my shellscripting abilities :-) regards, usleep On 3/29/06, Dan Nelson wrote: > In the last episode (Mar 29), usleepless@gmail.com said: > > > 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 > implementations ) > > > > 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? > > jot - $1 $3 $2 > > ( which in your case would be "jot - 1 60 2" ) > > -- > =09Dan Nelson > =09dnelson@allantgroup.com >