The UNIX and Linux Forums  

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




Thread: using sed
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 03-17-2008
era
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
You are getting outside the realm of what sed can reasonably do. At this point I would probably switch to Perl.


Code:
perl -pe 's/\bFoot\b/Play/g;s/\bfoot\b/play/g; warn if m/[Ff]oot/' files ...

This should handle full stop and other punctuation, which the sed script won't (without additional tinkering).