Hello all. I have a file that looks like this:
The repeating pattern seems obvious. Each row starts with either text that starts at the beginning of the row (i.e. hostname which could be the key to a hash), or the row starts with white space or tabs and then some text which could be the values associated with the key of the hash (i.e. serial number, interface, etc..). I have been working on solving this to parse through files with a Perl program but I've failed so far. I was hoping the Perl community might have suggestions to help me grasp what seems like should be a simple concept.Hostname1 1.1.1.1 Cisco Chassis Serial Number xyz123 Interface Gig0/0/31 Hostname2 2.2.2.2 Juniper Chassis Serial Number abc123 Interface Gi-0/0/31
In reply to Create based on repeating data by Perl-Thornton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |