#! c:/bin/awk
# uniq-c - replace `uniq -c'
# Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet

BEGIN { count = 1
	getline
	last = $0
      }
      { if ($0 == last)
	  count++;
	else
	  {
	    print "[" count "] " last
	    last = $0
	    count = 1
	  }
      }
END   { print "[" count "] " last }
