如何忽略配置文件选择横幅(外壳/链接)



出于某种原因,我应该先运行shell配置文件,然后需要获取如下所示的远程操作系统命令结果。

但是,如果配置文件中有"选择"功能,则plink卡住。有什么办法可以忽略这个"选择"吗?

plink -ssh -l username -pw passwd 192.168.0.5 " . ~/.profile 2> /dev/null; ls; "
Selection enter a number
1. Your choice = one
2. Your choice = two
3. Your choice = three
Please enter your choice:

这是一个服务器端问题,不能在客户端解决。

您需要将交互式内容从.profile移动到适当的位置(bash shell 的.bashrc(。

最新更新