Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 2002 09:56:06 -0700
From:      "David Smithson" <david@customfilmeffects.com>
To:        "Lee J Carmichael" <lcarmich@wamnet.com>
Cc:        "FreeBSD-Questions" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: How do I repeat a command N times?
Message-ID:  <004201c22769$8468df70$0801a8c0@customfilmeffects.com>
References:  <Pine.SGI.3.96.1020709114940.295966D-100000@y.dev.wamnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Aha.  A FOR loop?

----- Original Message -----
From: "Lee J Carmichael" <lcarmich@wamnet.com>
To: "David Smithson" <david@customfilmeffects.com>
Cc: "FreeBSD-Questions" <freebsd-questions@FreeBSD.ORG>
Sent: Tuesday, July 09, 2002 9:52 AM
Subject: Re: How do I repeat a command N times?


> For ksh:
>
> let x=0
> let stop=607
>
> while [[ $x -le $stop ]]
> do
>   # whatever you'd like
>   echo $x
>   let x=$x+1
> done
>
> I guess you could make 'x' to 'n'... ;)
>
> Take Care,
>
> --------
> Lee Carmichael
> Service Architect - WorkSpace
>
> WAM!NET Inc.
> 655 Lone Oak Rd Building A
> Eagan, MN 55121
>
> ph# 651-256-5292
> email: lcarmich@wamnet.com
>
> On Tue, 9 Jul 2002, 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?
> >
> > --
> > David Smithson - Systems Administrator
> > Custom Film Effects
> >
> >
> >
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
> >


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?004201c22769$8468df70$0801a8c0>