From c5515a353e7316cb1c2ba3d4dce2979d5779ce37 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sun, 8 Dec 2013 12:15:18 -0600 Subject: [PATCH] Try this sed command for squeeze_lines(). --- test/common.sh.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common.sh.in b/test/common.sh.in index 94b41906..8f5d576c 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -126,11 +126,11 @@ check_for_hard_links () { set -e } -#### Filter that squeezes blank lines, emulating GNU cat -s. +#### Filter that squeezes blank lines, partially emulating GNU cat -s, +#### but sufficient for our purpose. +#### From http://www-rohan.sdsu.edu/doc/sed.html, compiled by Eric Pement. squeeze_lines() { - awk 'length($0) == 0 && e == 1 { next } - { e = length($0) == 0 } - { print }' + sed '/^$/N;/\n$/D' } #### Filter that inserts initial whitespace and converts non-breakable -- 2.56.0