Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!cg-atla!duane From: duane@cg-atla.UUCP (Andrew Duane) Newsgroups: comp.lang.c Subject: Re: Scrunch blank lines Summary: Shell script Message-ID: <6839@cg-atla.UUCP> Date: 27 Mar 89 14:27:52 GMT References: <7150@siemens.UUCP> <9900010@bradley> <4896@cbnews.ATT.COM> <26389@cornell.UUCP> Distribution: na Organization: Agfa Compugraphic Division, Wilmington, Mass Lines: 21 > In article <620@gonzo.UUCP> daveb@gonzo.UUCP (Dave Brower) writes: >So, I offer this week's challenge: Smallest program that will take >"blank line" style cpp output on stdin and send to stdout a scrunched >version with appropriate #line directives. [f]lex, Yacc, [na]awk, sed, >perl, c, c++ are all acceptable. If shell scripts are acceptable, how about: #!/bin/sh cat -s You may have to use "more" rather than cat. The moral: please don't reinvent the wheel [1/2 ;-)] Andrew L. Duane (JOT-7) w:(508)-658-5600 X5993 h:(603)-434-7934 Compugraphic Corp. decvax!cg-atla!duane 200 Ballardvale St. ulowell/ \laidback Wilmington, Mass. 01887 cbosgd!ima/ \cgeuro Mail Stop 200II-3-5S ism780c/ \wizvax Only my cat shares my opinions, and she has no blank lines.