You should try to avoid calling "zmprov" in a loop like this. Simply starting zmprov –which starts and stops an entire JVM– takes ~3 seconds already. So if you have 100 domains, this script will run for 5 minutes just on Java overhead alone, because it starts and stops a JVM 100 times.
The better way is to make your loop print "gd $domain" statements, and in the end pipe that through a single zmprov command.
Then you start zmprov twice (once for "gad" and once for the rest) instead of n+1 times for n domains.
(yes you will have a bit more work post-processing the output, but it will be much more efficient if you have many domains.)
The better way is to make your loop print "gd $domain" statements, and in the end pipe that through a single zmprov command.
Then you start zmprov twice (once for "gad" and once for the rest) instead of n+1 times for n domains.
(yes you will have a bit more work post-processing the output, but it will be much more efficient if you have many domains.)
Statistics: Posted by ghen — Tue Sep 17, 2024 7:30 pm