AWS Cloud EBS limit script!

Hi,

I am trying to correct the following script to get total EBS usage from Amazon cloud. Can someone please help in correcting it. It appears that its not working properly.

t=0; for i in `ec2-describe-volumes | grep VOLUME | grep standard | awk '{print $3}'`; do t=`expr $t + $i`; done; echo $t

Thanks!

Show us sample output of "ec2-describe-volumes" and what you want to count from there (desired output).

Hi,

Thanks for the response. Let me provide more details here. I am running the command on the console which is Amazon CLI and it's producing the output as shown in the image. What I am trying to achieve here is to get the size which is 100 in this image from all volumes and then calculate them to see the total usage of our volumes. My end goal is to collect in use volumes size and then add them all to get total capacity being used by volumes.

aws ec2 describe-volumes --output table

Thanks,