I have a question of how to use the grep command.
I want to search all *.c files for the string goto, but I don't want it to show the gotos which are in comments ( /* */).
After the /* and before the */ maybe other characters and also new lines.
How do I have to type the command to get the matches mentioned above
Thanks for your help.
have you tried 'man grep' ?
(to start with)
This provides an OK explanation of the grep command, and may be enough to point you in the right direction.
Just to give you some direction. You can pipe grep to itself, so if you grep for the word goto, and you want to eliminate any of the lines that have /* in them, then you can grep again with the -v option which will exclude any of the lines with that set of characters.
|All times are GMT -5. The time now is 07:23 AM.|