The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 06-22-2009
hareeshram hareeshram is offline
Registered User
  
 

Join Date: Mar 2007
Location: Chennai
Posts: 3
That was so fast and accurate!

Thanks scottn and radoulov.
It worked fine for me

I have a slight change in format that I would expect for both requirements. Hope you would suggest me.

Requirement 1:

The file names should come with full paths

Requirement 2:
After the file name (with full path), whatever the messages that are being displayed (one message for one line), they are to be displayed without any duplication ( the same message in consecutive lines should be removed) per entry and all non duplicated entries should be separted by comma (rather than new line"). Unlike in the above case, both file and comma separated messages should come in the single line.

Once again many many thanks for keeping my spirit up in unix.

Example input
=========

Example Input:
==============================
!ENTRY com.bea.workshop.upgrade81 <OKAY> <RESOURCE: /fullpath/Test.java> 2009-06-18 13:02:28.368
!MESSAGE Requesting upgrade report for file: Test.java

!ENTRY com.bea.workshop.upgrade81 <OKAY> <RESOURCE: /fullpath/Test1.jpf> 2009-06-18 13:02:28.384
!MESSAGE Requesting upgrade report for file: Test1.jpf

!ENTRY com.bea.workshop.upgrade81 <INFO> <RESOURCE: /fullpath/Test2.jpf> 2009-06-18 13:02:28.447
!MESSAGE Requesting upgrade report for file: Test2.jpf
!SUBENTRY 1 com.bea.workshop.upgrade81 <INFO> <RESOURCE: /fullpath/Test2.jpf> 2009-06-18 13:02:28.447
!MESSAGE The Java 5 annotation Jpf.Controller needs to be added.
!SUBENTRY 1 com.bea.workshop.upgrade81 <INFO> <RESOURCE: /fullpath/Test2.jpf> 2009-06-18 13:02:28.447
!MESSAGE More annotation of Jpf.Action needs to be added.

!ENTRY com.bea.workshop.upgrade81 <INFO> <RESOURCE: /fullpath/Test3.jpf> 2009-06-18 13:02:28.634
!MESSAGE Requesting upgrade report for file: Test3.jpf
!SUBENTRY 1 com.bea.workshop.upgrade81 <INFO> <RESOURCE: /fullpath/Test3.jpf> 2009-06-18 13:02:28.634
!MESSAGE The Java 5 annotation Jpf.Controller needs to be added.
!SUBENTRY 1 com.bea.workshop.upgrade81 <INFO> <RESOURCE: /fullpath/Test3.jpf> 2009-06-18 13:02:28.634
!MESSAGE The Java 5 annotation Jpf.Controller needs to be added.
!SUBENTRY 1 com.bea.workshop.upgrade81 <INFO> <RESOURCE: /fullpath/Test3.jpf> 2009-06-18 13:02:28.634
!MESSAGE Will add import of org.apache.beehive.netui.pageflow.annotations.Jpf for JPF annotation support.
!SUBENTRY 1 com.bea.workshop.upgrade81 <INFO> <RESOURCE: /fullpath/Test3.jpf> 2009-06-18 13:02:28.634
!MESSAGE ABC needs to be added.
!SUBENTRY 1 com.bea.workshop.upgrade81 <INFO> <RESOURCE: /fullpath/Test3.jpf> 2009-06-18 13:02:28.634
!MESSAGE ABC needs to be added.


Output for requirement1:
================================
/fullpath/Test.java
/fullpath/Test1.jpf

Output for requirement2:
================================
/fullpath/Test2.jpf (separated by tab) The Java 5 annotation Jpf.Controller needs to be added,More annotation of Jpf.Action needs to be added.
/fullpath/Test3.jpf (separated by tab) The Java 5 annotation Jpf.Controller needs to be added,Will add import of org.apache.beehive.netui.pageflow.annotations.Jpf for JPF annotation support,ABC needs to be added.