#!/usr/bin/env python2.2

import sys

if len(sys.argv) == 1:
  print "\n Usage:", sys.argv[0], " asciidatei\n"
  sys.exit(1)

f = open( sys.argv[1], 'r' )
c = 0
hash = {}
for zeile in f:
  zeile = zeile.strip()
  c = c + 1
  if len(zeile) > 0:
  
    if hash.has_key( zeile ):
      hash[zeile].append( c )
    else:
      hash[zeile] = [c]

f.close()

n = 0
for zeile in hash.keys():
  ll = len( hash[zeile] )
  if ll > 1:
    n = n + 1
    print "%s :\n%3d mal: %s\n" % (zeile, ll, hash[zeile])

if n == 0:
  print "Keine Zeile doppelt."
  