|
converting config file to csv format
Hello,
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:
define host{
host_name hostA
parents hostNull
}
--
define host{
host_name hostB
parents hostA
}
--
define host{
host_name hostC
parents hostB
}
--
and create this:
host,parent
hostA,hostNull
hostB,hostA
hostC,hostB
Does anyone know a solution to this or can someone point me out to some doc that explains how ?
|