I have some 1000s of records of the following format

host=host1
network=10.x.x.x
ip=10.x.x.x
gw=10.x.x.1
history=history1
   some comments.. multi line with some indentation at the beginning)
loc=loc1
owner=owner1
env=env1

host=host2
network=10.x.x.x
ip=10.x.x.1
gw=10.x.x.1
history=history2
   some comments (multi line comments  some indetation at the
begining)
owner=owner2
env=env2

Let's say my script is script.pl and I pass argument such as -
<hostname>, it gets me the details of its record.  Any help is
appreciated. I know how to do that  if it is a single line record..
Also, i don't know how to deal with history line (field for the
history) that has multiple lines.

Thanks
Karl


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to