def shellEscaped(text):
    """
    Returns the text escaped for inclusion inside a shell double-quoted string.
    """
    return text.replace('\\', '\\\\').replace('"', '\\"').replace('$', '\\$'
        ).replace('`', '\\`').replace('!', '\\!')
