def filter_cmd(cmd):
    """Remove some non-technical option strings from `cmd`, which is assumed to
    be a string containing a shell command.
    """
    cmd = cmd.replace(' -outputname /dev/null', '')
    cmd = cmd.replace(' -q', '')
    return cmd