Hi
I am new with shell script programming could some one please help.
How can I get the hostname with his infoline-1 to infoline-n if the total error for the hostname is >0 and then the next hostname-n and infoline-n (Skip the xxxx data and read and print the hostname No of errors and his information

Data file is:
Xxxxxxxxxx
Xxxxxxxxx
Hostname1
Infoline-1
Error=1
Infoline-n
Error=0
xxxxx
Total Error for hostname1 =1
Xxxxxxxxxxx
Xxxxxxxxxxx
Xxxxxxxxxx
Hostname2
Infoline-1
Error=0
Infoline-n
Error=0
Xxxxxxx
Total Error for hostname2 =0
Xxxxxxx
Hostname 3
Infoline-1
error=3
infoline-n
error=1
Total Error for hostname3 =4