Scrunch blank lines

Andrew Duane duane at cg-atla.UUCP
Tue Mar 28 00:27:52 AEST 1989


> In article <620 at gonzo.UUCP> daveb at 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.



More information about the Comp.lang.c mailing list