For 2 days now i've been searching for a solution to this. I am now beginning to doubt this is even possible. It's even harder when you don't know how to search for it. (which keywords generate enough relevancy etc..)
I need to parse a config file to generate a CSV file in return.
It would need to take these parameters out of the file:
Ok. I went with Franklin's awk solution and it works beautifully.
I also expanded it to include a third column named alias and also modified the code in such a way that it understands the space separated fields of the alias line.
define host{
host_name HostA
alias Also Known As Host A
parents HostNull
}
--
define host{
host_name HostB
alias Also Known As Host B
parents HostA
}