def METHOD_NAME(arg):
    """escape shell special characters"""
    slash = '\\'
    special = '"$'
    arg = arg.replace(slash, slash+slash)
    for c in special:
        arg = arg.replace(c, slash+c)
    # print("ESCAPE RESULT: %s" % arg)
    return '"' + arg + '"'