On Thu, May 2, 2013 at 2:05 PM, Matt wrote:
> There is a unix command called repeat.
>
> repeat 10 some_command
Someone has already mentioned tcsh, but this is also a builtin
(syntactic operator like "while" or "for", actually) in zsh.
repeat 10 simple_command
repeat 10 do list; of; commands; do
> repeat 10 some_command
Found this on the web somewhere:
#!/bin/sh
i=0
num=$1
shift
while [ $(( i += 1 )) -le $num ]; do
eval "$@"
done
Worked fine. Thanks.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
On Fri, May 3, 2013 at 3:52 PM, Frank Cox wrote:
>
>> Is it _really_ that hard to type the explicit loop with test ([) and
>> expr? These were builtins even in bourne shell eons ago.
>
> Here is the simplest possible solution, and exactly what I think the OP was
> looking for:
>
> http://www.mel
On Fri, 3 May 2013 13:02:47 -0500
Les Mikesell wrote:
> Is it _really_ that hard to type the explicit loop with test ([) and
> expr? These were builtins even in bourne shell eons ago.
Here is the simplest possible solution, and exactly what I think the OP was
looking for:
http://www.melvilleth
Les Mikesell wrote:
> On Fri, May 3, 2013 at 1:23 PM, wrote:
>
True. Thing I like about seq is that it also takes an optional
increment value which can be very handy at times.
>>>
>>> Is it _really_ that hard to type the explicit loop with test ([) and
>>> expr? These were builtins e
On Fri, May 3, 2013 at 1:23 PM, wrote:
>>> True. Thing I like about seq is that it also takes an optional
>>> increment value which can be very handy at times.
>>
>> Is it _really_ that hard to type the explicit loop with test ([) and
>> expr? These were builtins even in bourne shell eons ago
Les Mikesell wrote:
> On Thu, May 2, 2013 at 6:45 PM, John R. Dennison wrote:
>> On Fri, May 03, 2013 at 01:36:36AM +0200, Markus Falb wrote:
>>>
>>> this works but at least with bash you can do it with brace expansion
>>> for x in {1..10}; do … ; done
>>>
>>> it's a bashism but maybe more portabl
On Thu, May 2, 2013 at 6:45 PM, John R. Dennison wrote:
> On Fri, May 03, 2013 at 01:36:36AM +0200, Markus Falb wrote:
>>
>> this works but at least with bash you can do it with brace expansion
>> for x in {1..10}; do … ; done
>>
>> it's a bashism but maybe more portable, e.g. OS-X has no seq
>> n
On Fri, May 03, 2013 at 02:03:06AM +0200, Markus Falb wrote:
>
> $ echo {1..10..2}
C6's bash supports this; C5 sadly does not. But thank you for pointing
this out to me as I was unaware of this form.
John
--
Failure is not the only pun
On 03.Mai.2013, at 01:45, John R. Dennison wrote:
> On Fri, May 03, 2013 at 01:36:36AM +0200, Markus Falb wrote:
>>
>> this works but at least with bash you can do it with brace expansion
>> for x in {1..10}; do … ; done
>>
>> it's a bashism but maybe more portable, e.g. OS-X has no seq
>> no fo
On Fri, May 03, 2013 at 01:36:36AM +0200, Markus Falb wrote:
> On 03.Mai.2013, at 00:01, John R. Dennison wrote:
>
> > On Thu, May 02, 2013 at 04:26:06PM -0500, Matt wrote:
> >>
> >> repeat 10 dig @server-ip-address +short +tries=1 +time=1 your-zone.com a
> >>
> >
> > for x in $(seq 1 10); do d
On Fri, May 03, 2013 at 01:36:36AM +0200, Markus Falb wrote:
>
> this works but at least with bash you can do it with brace expansion
> for x in {1..10}; do … ; done
>
> it's a bashism but maybe more portable, e.g. OS-X has no seq
> no fork (for the seq) is necessary as well
True. Thing I like
On 03.Mai.2013, at 00:01, John R. Dennison wrote:
> On Thu, May 02, 2013 at 04:26:06PM -0500, Matt wrote:
>>
>> repeat 10 dig @server-ip-address +short +tries=1 +time=1 your-zone.com a
>>
>> Can I do that with watch?
>
> No. But you can do it with 'seq':
>
> for x in $(seq 1 10); do dig @serv
On 02.Mai.2013, at 23:37, Alfred von Campe wrote:
> On May 2, 2013, at 17:34, Michael Mol wrote:
>
>> On 05/02/2013 05:05 PM, Matt wrote:
>>> There is a unix command called repeat.
>>>
>>> repeat 10 some_command
>>>
>>> Basically repeats some command ten times. Is it available on Centos 6
>>>
On Thu, May 02, 2013 at 04:26:06PM -0500, Matt wrote:
>
> repeat 10 dig @server-ip-address +short +tries=1 +time=1 your-zone.com a
>
> Can I do that with watch?
No. But you can do it with 'seq':
for x in $(seq 1 10); do dig @server-ip-address +short +tries=1 +time=1
your-zone.com a; done
On Thu, May 2, 2013 at 4:16 PM, wrote:
>
>> Basically repeats some command ten times. Is it available on Centos 6
>> and what package provides it?
>
> Would never have looked for it - for (( i=-; $i < 10; i++ )); do echo $i;done
>
I'm even more old-school with bourne syntax:
i=0
while [ $i -lt
On May 2, 2013, at 17:34, Michael Mol wrote:
> On 05/02/2013 05:05 PM, Matt wrote:
>> There is a unix command called repeat.
>>
>> repeat 10 some_command
>>
>> Basically repeats some command ten times. Is it available on Centos 6
>> and what package provides it?
>
> # yum whatprovides "*bin/re
On 05/02/2013 05:05 PM, Matt wrote:
> There is a unix command called repeat.
>
> repeat 10 some_command
>
> Basically repeats some command ten times. Is it available on Centos 6
> and what package provides it?
# yum whatprovides "*bin/repeat"
[snip]
No Matches found
HTH
signature.asc
Descr
ok I'd use a script and use sleep
On 2 May 2013 22:26, Matt wrote:
> > Hello Matt
> > try man watch
> > All the best Paul
>
> What I am trying to do is:
>
> http://www.redbarn.org/dns/ratelimits
>
> repeat 10 dig @server-ip-address +short +tries=1 +time=1 your-zone.com a
>
> Can I do that with
> Hello Matt
> try man watch
> All the best Paul
What I am trying to do is:
http://www.redbarn.org/dns/ratelimits
repeat 10 dig @server-ip-address +short +tries=1 +time=1 your-zone.com a
Can I do that with watch?
___
CentOS mailing list
CentOS@centos.
Matt wrote:
> There is a unix command called repeat.
>
> repeat 10 some_command
>
> Basically repeats some command ten times. Is it available on Centos 6
> and what package provides it?
Would never have looked for it - for (( i=-; $i < 10; i++ )); do echo $i;done
mark
_
Hello Matt
try man watch
All the best Paul
On 2 May 2013 22:05, Matt wrote:
> There is a unix command called repeat.
>
> repeat 10 some_command
>
> Basically repeats some command ten times. Is it available on Centos 6
> and what package provides it?
> __
22 matches
Mail list logo