I run the following command:
aws ec2 describe-instances --filters "Name=ip-address,Values=MY_IP" | grep InstanceId
and I get:
"InstanceId": "i-b0f13081",
How can I only get the following:
i-b0f13081
This is what I tried:
aws ec2 describe-instances --filters "Name=ip-address,Values=MY_IP" | grep InstanceId | gawk -F: '{ print $2 }'
"i-b0f13081",