Imported from ../bash-1.14.7.tar.gz.
[platform/upstream/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 }