def split_outfile(line):
    """
    Split the output file from a command.
    """
    redirect = line.find('>')
    if redirect == -1:
        return line, None
    else:
        return line[:redirect].rstrip(), line[redirect+1:].lstrip()