#!/usr/bin/env python2.7
import sys

files = sys.argv[1:]

keys = set()
fileVals = []
for file in files:
  vals = {}
  fileVals.append(vals)
  try:
    for line in open(file).readlines():
      k, v = line.split()
      vals[k] = v
      keys.add(k)
  except Exception, e:
    print "Error in line \"%s\" of file %s" % (line, file)
    raise e


for key in sorted(keys):
  sys.stdout.write(key)
  for vals in fileVals:
    sys.stdout.write("\t")
    sys.stdout.write(str(vals.get(key, 0)))
  sys.stdout.write("\n")

#!/usr/bin/env python2.7
import sys

files = sys.argv[1:]

keys = set()
fileVals = []
for file in files:
  vals = {}
  fileVals.append(vals)
  try:
    for line in open(file).readlines():
      toks = line.split()
      if len(toks) != 2:
        print >> sys.stderr, "Bad line: %s" % repr(toks)
      else:
        k, v = toks
        vals[k] = v
        keys.add(k)
  except Exception, e:
    print >> sys.stderr, "Error in line \"%s\" of file %s" % (line, file)
    raise e


for key in sorted(keys):
  sys.stdout.write(key)
  for vals in fileVals:
    sys.stdout.write("\t")
    sys.stdout.write(str(vals.get(key, 0)))
  sys.stdout.write("\n")

Add initial data for operations counts
Add initial data for operations counts

git-svn-id: 0c5512015aa96f7d3f5c3ad598bd98edc52008b1@12204 dc4e9af1-7f46-4ead-bba6-71afc04862de
