I'm looking for a quick and dirty way to strip trailing blank lines
from a file. I know I can use a script based on "tail -1" and a
temporary file, but is there an easier way to do it with sed, awk,
perl, etc.?
------ Sample input ------
this line has text
so does this one
the next line is blank
the previous line is blank
the next two lines are blank
------ Sample output -------
this line has text
so does this one
the next line is blank
the previous line is blank
the next two lines are blank
----------------------------
--
Cliff Tuel __o o__
HP/Apollo System Admin \( v )/ YELLO & ART OF NOISE mailing lists: