Write a script/program to parse the output of the command 'cat [url removed, login to view]' (see linked file)
The program should:
Create a new file for every server. The file should be named with the server id which is the second field in the "INSTANCE" line.
The first line of the file should be the state of the server, identified as the 6th field of the "INSTANCE" line. E.G., running/stopped/etc
The remaining lines of the file should be the block device ids, identified by an id of the form qqa-<digits>, and the device name. An example line looks like: "qqa-3748959 /dev/sda"
The device lines should be sorted in order of the device name (/dev/sda, etc)
Place the resulting files in directories named for the server type. The type is identified by the last field of the "TAG" line of "Type".