Want a way to strip comments from a
K.LAUX
rkl1 at hound.UUCP
Fri Mar 17 04:32:24 AEST 1989
In article <9900010 at bradley>, brian at bradley.UUCP writes:
|
| > /* Written 9:58 am Mar 9, 1989 by jrv at siemens.UUCP */
| > /* ---------- "Want a way to strip comments from a" ---------- */
| > Does anyone have a sed or awk script which we
| > can use to preprocess the C source and get rid of all the comments before
| > sending it to the compiler?
|
| The following works in vi: :%s/\/\*.*\*\///g
|
| I don't know if it will work in sed, but it should...
|
Yes, it will. The only problem is that it won't strip out comments
that span more than one line...'Aye, There's the Rub.
--rkl
More information about the Comp.lang.c
mailing list