I have tried to get instance details by using following aws command
aws ec2 describe-instances --filters "Name=instance.group-name, Values=index-cores"
However it gives output in json format. So I tried following grep on output
aws ec2 describe-instances --filters "Name=instance.group-name, Values=index-cores"|grep -w "PrivateIpAddress"|sort -u
but still result is not as expected.
Can anyone suggest how to get single line output for each IP.