From owner-freebsd-questions Tue Jul 9 11: 5: 3 2002 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 56E3B37B405 for ; Tue, 9 Jul 2002 11:04:55 -0700 (PDT) Received: from smtp.isoco.com (terremoto.isoco.net [212.9.90.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D7AD43E3B for ; Tue, 9 Jul 2002 11:04:54 -0700 (PDT) (envelope-from fxn@retemail.es) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.isoco.com (Postfix-Nx) with SMTP id 170D12764F; Tue, 9 Jul 2002 20:04:49 +0200 (CEST) Received: from smtp.bcn.isoco.net (ldap.isoco.net [172.16.0.11]) by smtp.isoco.com (Postfix-Nx) with ESMTP id 0D4AC2762E; Tue, 9 Jul 2002 20:04:49 +0200 (CEST) Received: from fxn (fxn.bcn.isoco.net [172.16.1.50]) by smtp.bcn.isoco.net (Postfix) with SMTP id 67C1CCD2B5; Tue, 9 Jul 2002 20:04:46 +0200 (CEST) Date: Tue, 9 Jul 2002 20:04:49 +0200 From: F.Xavier Noria To: "David Smithson" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: How do I repeat a command N times? Message-Id: <20020709200449.3fcf1ba7.fxn@retemail.es> In-Reply-To: <003101c22768$80ddb250$0801a8c0@customfilmeffects.com> References: <003101c22768$80ddb250$0801a8c0@customfilmeffects.com> X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 9 Jul 2002 09:48:51 -0700 "David Smithson" wrote: : Hello friends. I want to repeat a command 607 times and stop. How do I : accomplish this besides writing a script that's 607 lines long? With a Perl one-liner: $ perl -e '$n = 607; system "cmd" while $n--' -- fxn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message