]> diplodocus.org Git - nmh/commitdiff
That didn't work, so try this awk command from Robert Elz.
authorDavid Levine <levinedl@acm.org>
Sun, 8 Dec 2013 16:56:35 +0000 (10:56 -0600)
committerDavid Levine <levinedl@acm.org>
Sun, 8 Dec 2013 16:56:35 +0000 (10:56 -0600)
test/common.sh.in

index 49e1c48..94b4190 100644 (file)
@@ -128,7 +128,9 @@ check_for_hard_links () {
 
 #### Filter that squeezes blank lines, emulating GNU cat -s.
 squeeze_lines() {
 
 #### Filter that squeezes blank lines, emulating GNU cat -s.
 squeeze_lines() {
-  awk '!length() && e {next} {e = !length()} 1'
+  awk 'length($0) == 0 && e == 1 { next }
+          { e = length($0) == 0 }
+          { print }'
 }
 
 #### Filter that inserts initial whitespace and converts non-breakable
 }
 
 #### Filter that inserts initial whitespace and converts non-breakable