UsingSolution by Using SED command and no Script
If you want to delete the line containing either '/*' or '*/'Here you can useare:
sed -e ''s/\*\//d' -e '/\/\*\n&/d'g' test
 You can also save the output by using > and your new file, for instance:
sed -e '/\*\//d'| -esed '/\/\*/d' test > test2
But if you just want to delete only '/*' and '*/' and not the whole line, you should change the sed command to this one:
sed -e 's,/\*\///g' -e 's/\/\*//g' test
Summary
Option '-e command' appends the editing commands specified by the command argument to the list of commands.
's/X//g' will remove the word "X" from lines.
'/X/d' will remove lines containing the word "X"
N.B. if your looking for starting a loop by setting a beginning and end point, You need to write a script in more complex situations. What I wrote, only works when you want to delete lines containing a special character, for example we have two lines of a comment, one starts with a '/*' and the other ends in '*/', what I wrote willThis doesn't work in this case since those lines contain these elements, but if your comment has more lines and some of them ain't containing those special characters, you'll be in need of a script. If you're using scripts written in perl, ruby, or whatsoever else, be aware that you might be in need of removing empty lines after running the script. BTWon OS X, unless you can useinstall gnu-sed '/\/\*/,/\*\//d' test but it can only delete lines where there is at least one new line between start and end points. Easiest way for complex situations, is using scripts.
I hope I could be helpful, and preciseBut it works on Linux Distros.
Good Luck