View Single Post
Old Jun 20th, 2005, 10:07 AM   #2
jim mcnamara
Hobbyist Programmer
 
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4 jim mcnamara is on a distinguished road
awk solution:

awk ' {if(/AB/) 
       { print "CDE" $0} 
       else 
         {print $0}
       } ' filename
filename contents:
AB
PDQ
PLMAB
output from awk:
CDEAB
PDQ
CDEPLMAB
jim mcnamara is offline   Reply With Quote