d a i s y Asked: 2017-04-25 03:31:02 +0800 CST2017-04-25 03:31:02 +0800 CST 2017-04-25 03:31:02 +0800 CST Zenity 远程显示文本问题 772 当我运行命令时: ssh user@host "zenity --warning --width=500 --no-wrap --text="Your $VPN is not connected. Please connect it or inform to engineer" --display=:0" 如果我使用单引号,那么它工作正常,但有一个变量,所以我不得不使用双引号,它显示如下: ssh 1 个回答 Voted Best Answer Sethos II 2017-04-25T21:27:22+08:002017-04-25T21:27:22+08:00 对消息使用单引号,如下所示: ssh user@host "zenity --warning --width=500 --no-wrap --text='Your $VPN is not connected. Please connect it or inform to engineer' --display=:0" 或转义消息的双引号,如下所示: ssh user@host "zenity --warning --width=500 --no-wrap --text=\"Your $VPN is not connected. Please connect it or inform to engineer\" --display=:0"
对消息使用单引号,如下所示:
或转义消息的双引号,如下所示: