All pastes #2105551 Raw Edit

epsas

public python v1 · immutable
#2105551 ·published 2012-01-24 02:08 UTC
rendered paste body
#!/usr/bin/env pythonfrom sys import argvimport commandsif __name__ == "__main__":  try:    source = argv[1]    files = argv[2:]  except:    print "Usage:  %s source_file file_to_compare_1 file_to_compare_2 . . ." % argv[0]    print "The files with the lowest number are closest in content to source_file"    raise SystemExit  for f in files:    count = commands.getoutput ( "diff %s %s | wc -l " % ( source, f) )    print count,f