def executeCommand(command, error_message, file_path, regex=re.compile('^(\\d+)[a|c|d]?\\d*(?:,\\d+[a|c|d]?\\d*)?$')):
    try:
        output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT).strip()
        if output:
            return output.decode('utf-8').split('\n')
        return []
    except subprocess.CalledProcessError as e:
        if ((e.returncode != 0) and (e.returncode != 1)):
            return [('ERROR: something went wrong while executing: %s' % e.cmd)]
        error_messages = [('%s for file: %s' % (error_message, file_path))]
        for line in e.output.decode('utf-8').splitlines():
            for num in regex.findall(line):
                error_messages.append(('  %s:%s' % (file_path, num)))
        return error_messages
def executeCommand(command, error_message, file_path, regex=re.compile('^(\\d+)[a|c|d]?\\d*(?:,\\d+[a|c|d]?\\d*)?$')):
    try:
        output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT).strip()
        if output:
            return output.decode('utf-8').split('\n')
        return []
    except subprocess.CalledProcessError as e:
        if ((e.returncode != 0) and (e.returncode != 1)):
            return [('ERROR: something went wrong while executing: %s' % e.cmd)]
        error_messages = [('%s for file: %s' % (error_message, file_path))]
        for line in e.output.decode('utf-8').splitlines():
            for num in regex.findall(line):
                error_messages.append(('  %s:%s' % (file_path, num)))
        return error_messages