• Uncategorized

About linux : Pass-Linux-command-output-as-a-parameter-to-another-command-in-BASH

Question Detail

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

Question Answer

No answer for now.

You may also like...

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.