The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: sed question
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-07-2007
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
here's something to start with - sorry, don't have much time to spend on this right now.

nawk -f arush.awk myFile

arush.awk:

Code:
BEGIN {
  FS=":!:"
  pat2rm="[(][0-9][0-9]*[)]"
}
{
   for(i=1; i<= NF; i++) {
     gsub(pat2rm, "", $i)
     print $i
    }
}