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