I am having a problem trying to get started with Sed and Awk which I believe is the best solution to my current problem.
I have a text file which repeats this:
Not a real host ##<--- if Not a real host ignore all lines until next blank line
uuid (MI) ##<---- Is a real host so parse the number directly below and parse the name field and move on
I am simply trying to read line by line, if its a real host parse the first number and name and move on to next block
So far I am thinking I will search for text "Not a real host", then delete all lines until next empty line and do this for the entire file.
Then I will read entire file again and search for string "uuid (MI)" and just parse out the next line below for the number and then the 3 line below that for the name.
Perhaps someone out there can provide me feedback or a better way to do this?
Thanks in advance,