I try to do something for automation and want to prepare a bash script for this.
I run this command :
curl http://xxx/_cat/indices?s=store.size | grep alpha | awk '{ print $3 }'
Then this command returns like this;
alpha-1
alpha-2
alpha-3
alpha-4
...
And I want to use this output separately in another command like this;
for i in <ALPHA_VARIABLES>
do
curl -X DELETE http://xxx/$i
done
How can I do this in a bash script? I am very thankful in advance