Excellent suggestion to use the /proc system grep.
But as a training exercise for me, (I wasn't very clear initially), I'm looking for how to parse the different areas. Pseudo-code time:
while(<>) {
# search for lots of dashes, that separates the server records
#once we have found that, we're at step 1
# Step 1
# gather server name/main ip address
# if we find "ifconfig" go to step 2
# Step 2
# gather IP address info
# if we find "uname" to to step 3
# Etc...
}
That's my current, probably bad, idea of how to tackle the problem. I'm pretty sure there are much better ways of going about it...
-Scott