The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Pattern searching pattern in c files
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
Pattern searching pattern in c files
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
11-16-2007
uvrakesh
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
uvrakesh
View Public Profile
Find all posts by uvrakesh