The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using Perl to add hyperlink to html files Raynon Shell Programming and Scripting 17 11-01-2007 01:03 AM
xml parsing error in perl bishweshwar UNIX for Advanced & Expert Users 1 05-30-2007 07:59 PM
perl and html marcpascual Shell Programming and Scripting 8 09-21-2005 04:47 PM
PERL - Parsing Crystal Reports srinivay Shell Programming and Scripting 0 05-12-2005 04:55 AM
Perl: Variable input via HTML douknownam Shell Programming and Scripting 5 02-13-2005 07:39 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-21-2007
Registered User
 

Join Date: Feb 2007
Posts: 6
Question HTML parsing by PERL

i have a HTML report file..its in attachment(a part of the whole report is attached..name "input html.doc").also its source is attached in "report source code.txt"

i just want to seperate the datas like in first line it should be..

NHTEST-3848498958-NHTEST-10.2-no-baloo a
and so on for whole report

i have done that already using a perl script.its also attached ,named-"perl coding for parsing.txt"(its attached for ur help)

now suppose i have more than 1 file,ie 20 report in html format.and i have to compare different values of all the tables from different report files (ie,to compare buffer cache values from different report file).

so how to do that..plss give me some ideas.
i need a script to do this in unix or perl..can you help me in this regards.
waitin for ur reply
Attached Files
File Type: doc input html.doc (74.5 KB, 8 views)
File Type: txt report source code.txt (9.4 KB, 7 views)
File Type: txt perl coding for parsing.txt (4.0 KB, 7 views)
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-23-2007
Registered User
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,397
Code:
sed -n "s/.*Buffer Cache:<\/TD><[^>]*> *\([0-9,]*[A-Za-z]*\)<\/TD><[^>]*> *\([0-9,]*[A-Za-z]*\).*/\1 \2/p" report source code.txt
This will give buffer cache values from report source code.txt
Reply With Quote
  #3 (permalink)  
Old 02-23-2007
Registered User
 

Join Date: Feb 2007
Posts: 6
Unhappy for multiple file????

thanks for replying...
it will be valid for one report file only.but how can it be possible for 500 report files...i have to write a script which only can do it .then only can i compare the values

Last edited by avik1983; 02-23-2007 at 05:05 AM. Reason: not completed query before
Reply With Quote
  #4 (permalink)  
Old 02-23-2007
Registered User
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,397
If you kept all the report files in one directory then try this
Code:
sed -n "s/.*Buffer Cache:<\/TD><[^>]*> *\([0-9,]*[A-Za-z]*\)<\/TD><[^>]*> *\([0-9,]*[A-Za-z]*\).*/\1 \2/p" *
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0