Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.os.minix Subject: Re: Important new program: cleanit.c Message-ID: <3498@solo10.cs.vu.nl> Date: 5 Oct 89 01:51:05 GMT References: <3492@ast.cs.vu.nl> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 30 ast@cs.vu.nl (Andy Tanenbaum) writes: \... clean(stdin, stdout); \... clean(in, out, p); Bug! clean() isn't a varargs function. Even thou shalt use lint, Mr T.! And why write a 73 line C program when a 17 line shell script can do the task equally fast? ----------8<----------8<----------8<----------8<----------8<---------- : CUT_LINE="--------------------" SED=" 1,/^$CUT_LINE/d /^$CUT_LINE/,\$d " test $# = 0 && exec sed "$SED" for i do backup=`expr "$i" : '\(.............\)' \| "$i"`'#' mv "$i" "$backup" && sed "$SED" < "$backup" > "$i" done ----------8<----------8<----------8<----------8<----------8<---------- -- Did Andy Tanenbaum get his programming |Maarten Litmaath @ VU Amsterdam: instruction from a Cereal box? (Sam McCrea)|maart@cs.vu.nl, mcvax!botter!maart