]> git.ipfire.org Git - thirdparty/bash.git/blob - support/cat-s
87ba1634e7877b322ced3930631cd3ef71a2fbe3
[thirdparty/bash.git] / support / cat-s
1 # This awk script is called from within Makefile to strip multiple blank
2 # lines from stdin.
3 BEGIN { newlines = 0 }
4 {
5 if (NF == 0)
6 newlines = 1;
7 else
8 {
9 if (newlines)
10 {
11 printf "\n";
12 newlines = 0;
13 }
14 print $0;
15 }
16 }