I am writing a script that runs through an existing
c program and finds whether it contains comments:
They should start and end in comment tags:
/* and */
How can I achieve this?
Example: This works:
egrep "/\.*\./" sample.txt
But i want to list the lines that start and end with /* / only, for example consider this input: hi / */ hello ; this is not a valid comment but its gonna be in the output when your command is used.