[CentOS] repeat command
Markus Falb
wnefal at gmail.comThu May 2 23:36:36 UTC 2013
- Previous message: [CentOS] repeat command
- Next message: [CentOS] repeat command
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 @server-ip-address +short +tries=1 +time=1 your-zone.com a; done
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
-- 
Regards, Markus
  - Previous message: [CentOS] repeat command
- Next message: [CentOS] repeat command
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list