xargs is really powerful and sometimes allows some one-liners that are easier to write and read than bash loops
Deleting many indices from an ElasticSearch cluster, one-by-one.
curl -s localhost:9200/_cat/indices?h=index | \
grep 2017 | \
sort | \
xargs -t -L1 -n1 -I '{}' curl -X DELETE 'localhost:9200/{}'