From owner-freebsd-questions@FreeBSD.ORG Wed Mar 29 18:43:45 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 582F416A628 for ; Wed, 29 Mar 2006 18:43:45 +0000 (UTC) (envelope-from usleepless@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id E084943D53 for ; Wed, 29 Mar 2006 18:43:44 +0000 (GMT) (envelope-from usleepless@gmail.com) Received: by zproxy.gmail.com with SMTP id 34so235042nzf for ; Wed, 29 Mar 2006 10:43:44 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MOvtwO16ROQ91psuTQuDMnu7Yw9YUU96QZ1iXtN9SoQNPlIvURrwfL4y0mT6ZuQKjKhsSIea7Hb7qhlKyHTdMV+xaBxTb4IzQkImV8j2150n+cbyplRW5pdovh0ZgBzyxRIVVkfkQSjwnbjH/C9nKVrpIH3AkdCwPZHI8Trs4sM= Received: by 10.36.60.6 with SMTP id i6mr1344379nza; Wed, 29 Mar 2006 10:43:43 -0800 (PST) Received: by 10.36.154.20 with HTTP; Wed, 29 Mar 2006 10:43:43 -0800 (PST) Message-ID: Date: Wed, 29 Mar 2006 20:43:43 +0200 From: usleepless@gmail.com To: freebsd-questions@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: 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 18:43:45 -0000 never mind! #!/bin/csh if ($#argv =3D=3D 2) then @ start =3D $argv[1] @ end =3D $argv[2] @ i =3D $argv[1] while ( $i <=3D $end ) echo $i @ i =3D $i + 1 end endif if ($#argv =3D=3D 3) then @ start =3D $argv[1] @ end =3D $argv[3] @ step =3D $argv[2] @ i =3D $argv[1] while ( ($step>0 && $i <=3D $end) || ($step<0 && $i >=3D $end) ) echo $i @ i =3D $i + $step end endif