Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!eecae!tank!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!bradley!brian From: brian@bradley.UUCP Newsgroups: comp.lang.c Subject: Re: Want a way to strip comments from a Message-ID: <9900010@bradley> Date: 13 Mar 89 23:48:00 GMT References: <7150@siemens.UUCP> Lines: 18 Nf-ID: #R:siemens.UUCP:7150:bradley:9900010:000:723 Nf-From: bradley.UUCP!brian Mar 13 17:48:00 1989 > /* Written 9:58 am Mar 9, 1989 by jrv@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... ............................................................................... "Don't drop acid, take it pass-fail!" Brian Michael Wendt UUCP: {cepu,uiucdcs,noao}!bradley!brian Bradley University ARPA: cepu!bradley!brian@seas.ucla.edu (309) 677-2335 ICBM: 40 40' N 89 34' W