The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 11-16-2007
uvrakesh uvrakesh is offline
Registered User
 

Join Date: Dec 2005
Posts: 74
finding / operator

sed -n '/\/\//d; /\/\*/d ; /\*\//d ;/\//p' hello.c

This would first remove all the // comments and then /* and then */
and then from the remaining search for /

Hope this may help

Regards,
RUV
Reply With Quote