Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 2002 20:04:49 +0200
From:      F.Xavier Noria <fxn@retemail.es>
To:        "David Smithson" <david@customfilmeffects.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 9 Jul 2002 09:48:51 -0700
"David Smithson" <david@customfilmeffects.com> 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




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