As far as I know there's no batch/non-interactive mode for the CLI, but everything done through the CLI can be done through the REST API, so you could just as easily automate with curl, or your favourite HTTP client.
Due to the SQL syntax, "-" is parsed as a subtraction operator. If your index names have "-" in them, then you need to wrap the whole index name in quotes:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.