Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mit-eddie!ll-xn!rkc From: rkc@XN.LL.MIT.EDU (rkc) Newsgroups: comp.unix.questions Subject: New sed or awk question,thanks for last answer Message-ID: <1416@xn.LL.MIT.EDU> Date: 26 May 89 12:51:10 GMT Organization: MIT Lincoln Laboratory, Lexington, MA Lines: 31 Thanks to those who answered my last sed question concerning stripping blank lines and lines starting with # from a file. The solution was: sed -e '/^#/D' -e '/^[]*$/D' filename or sed -e '/^#/D' -e '/^[]*$$/D' filename in a makefiley My new question is much tougher, (I'm not certain it can be done with sed, or grep, but that it may require awk.) I want to strip out all of the subroutine definitions of a file up to and including the { character. In other words, give a file with /* Lots of comments */ float * function_name(arg1,arg2) argtype arg1; argtype arg2; { } I want to get back: float * function_name(arg1,arg2) argtype arg1; argtype arg2; { Does anyone have code that does this, or can anyone suggest a script to do this? Thanks for your help. -Rob Please e-mail responses, as I do not follow this group. I will post if enough interest.