Extracting IPV4 IP addresses from a list of machine ID’s

for id in $(cat list.txt); do supernova lon show $id | awk '/accessIPv4/ {print $4}'; done >> iplist.txt

It’s a pretty simple hack. thanks to Jan for this.

Of course you need to extract the machine id’s to run the above statement. Here is how I did that:

nova list --tenant 10010101 > list.txt

Pretty cool. And yeah I know, I put step 1 after step 2, but you get the idea !

Leave a Reply

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