Hello!
I have application file and content looks like below. Each file having 5
or 6 server name in the content, same I have 800+ file under data folder.
A sample of file content:-
HOST “Developserver.com” Developserver.com
{
-trees
“/”
-exclude
“/tmp/pro**”
“/var/opt/Client”
“/dev/__pv**”
“/var/locks/slp.lock”
}
HOST “Testserver.com” Testserver.com
{
-trees
“/”
-exclude
“/tmp/proc**”
“/var/opt/Client”
“/dev/__pv**”
“/var/locks/slp.lock”
}
Now, how to read and string the content after “-exclude” and convert into
csv format like this
A Sample of Result:-
FileName HostName Excludelist
Dummy Developserver.com “/tmp/pro**”
"/var/opt/Client"
"/dev/__pv**"
"/var/locks/slp.lock"
Dummy Testserver.com “/tmp/pro**”
"/var/opt/Client"
"/dev/__pv**"
"/var/locks/slp.lock"
Any help much appreciated. Thx RR