bash pass array as command line argument


domains=(domain1.com domain2.com domain3.com)
printf ' -d %s' ${domains[*]} | xargs certbot --apache

it runs such command:
certbot --apache -d domain1.com -d domain2.com -d domain3.com

Leave a Reply

Your email address will not be published. Required fields are marked *