Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping based on hostname

Status
Not open for further replies.

KPKIND

Technical User
Sep 8, 2003
130
IN
Dear All,

I am just a beginner in using perl,so please could one of you help me in achieving the output described below.

I have the following lines in my data file

london:sddpcm:2:fscsi0:NORMAL:ACTIVE:10000000C9292FC5
london:sddpcm:2:fscsi1:NORMAL:ACTIVE:10000000C9292297
chester:sddpcm:2:fscsi0:NORMAL:ACTIVE:10000000C979FDD5
chester:sddpcm:2:fscsi1:NORMAL:ACTIVE:10000000C97D7590

I am trying to generate a html page with the above contents in a table, currently I am able to generate the webpage but a different table for each line. But I would ideally want to create a separate table for each hostname (london, chester are hostnames) and not for each line. In other words I want to group the details based on hostname.

I am sure of the logic and am able to do it using shell scripting, but because of poor knowledge in perl I am posting this here for your help.

TIA
KPKIND
 
What have you tried so far?

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Thanks Kevin for coming back.

As mentioned in my earlier post, I am a complete novice in perl. Since I felt it was easy (for me, because I dont know perl) to manage using shell scripting, I have got the task completed by using shell scripting.

I am sure perl would be handy in a lot of ways, but due to the urgency of the issue I am forced to use a solution that is quick.

Your attitude to help is much appreciated.
 
Does that mean you don't want to do this in perl anymore?

If you still need help, then show us what you have in shell scripting and we can help you port it to perl, or show us what you have in perl so far and we can help you build on that.

--
 
hehehe.... I can't tell if he's complimenting me or ridiculing me. I'll assume its a compliment of the highest order and pin it to the wall and use it for dart practice. [wink]

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top