def split_output(cmd_output):
    """Function splits the output based on the presence of newline characters"""

    # Windows
    if '\r\n' in cmd_output:
        return cmd_output.strip('\r\n').split('\r\n')

    # Mac
    elif '\r' in cmd_output:
        return cmd_output.strip('\r').split('\r')

    # Unix
    elif '\n' in cmd_output:
        return cmd_output.strip('\n').split('\n')

    # If no newline
    return cmd_output