#!/usr/bin/env python
# Michael Jack

import re, sys

for logFile in sys.argv[1:]:
    with open(logFile) as log:
        content = log.read()

        match = re.findall('user(.*)from', content)

        final = set(match)

    with open('userNames','a') as logOut:
        for word in final:
            logOut.write(str.lstrip((word)) + '\n')
