I am developing a shell script which actually stops aws running instances in a particular region & start them again as a part of schedule maintenance. but as ec2-api tools are heavy, takes time to execute the ec2 command. I want my system to hold up till the last ec2 command executes entirely and show its O/P. Like if i am executing
ec2-stop-instances some-id --region us-west-1
It should wait for completion of execution of ec2-stop. I didn't find any solution for this hence posting here.
Let me know if any one have any idea about how it should be done.