![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Perl Repetitive Pattern Matching | Niroj | Shell Programming and Scripting | 2 | 08-05-2009 10:17 AM |
| Perl -Pattern Matching help..! | coolbhai | Shell Programming and Scripting | 5 | 03-11-2009 01:15 PM |
| Perl Pattern Matching !!! Help | maxmave | Shell Programming and Scripting | 0 | 06-03-2008 08:05 PM |
| perl pattern matching | zedex | Shell Programming and Scripting | 2 | 09-30-2007 09:29 AM |
| perl pattern matching vs. grep | junkmail426 | Shell Programming and Scripting | 0 | 09-28-2005 11:40 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Perl Pattern Matching
Hello experts, I have a file containing the following text(shortened here). Code:
File Begin -----[31-32 changed to 31-32]----- < # Billboard.d3fc1302a677.imagePath=S:\\efcm_T4 < Billboard.d3fc1302a677.imagePath=S:\\efcm_T4 --- > # Billboard.d3fc1302a677.imagePath=S:\\efcm_Cassini > Billboard.d3fc1302a677.imagePath=S:\\efcm_Cassini -----[after 248 inserted 249-266]----- > > # ShowDialogAction.4aa6f5a0a2a1.buttonLabel=OK > ShowDialogAction.4aa6f5a0a2a1.buttonLabel=OK > > # ShowDialogAction.4aa6f5a0a2a1.cancelButtonLabel=Cancel > ShowDialogAction.4aa6f5a0a2a1.cancelButtonLabel=Cancel > File End I now need to write a perl script to grep for the header containing 'changed' (here : -----[31-32 changed to 31-32]-----), and count all the lines only having '>' symbol. For example: Here i grep for the word 'changed' from the first header and count the lines containing '>'. So the count must be 2. Similarly for the second match 'inserted', the number of lines will result in 7 with '>' symbol. Please help me....Thanks in advance. Last edited by Franklin52; 09-28-2009 at 08:17 AM.. Reason: Please use code tags! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|