![](/img/trans.png)
[英]in my bash loop over a list of some servers, if the ssh connects the bash script exits
[英]In my bash loop over a list of some servers the script exits after execution a perl script with ssh
我有一個與此類似的問題:
在我的bash循環中,一些服務器的列表上,如果ssh連接,則bash腳本退出
不幸的是, ssh
是從我無法編輯的perl腳本中調用的(因此,我無法在ssh
commad中添加-n
)。
還有什么可以做的?
在您的路徑中放置一個偽造的ssh
,將調用委派給真實的ssh並添加-n
我做了:
my_script < /dev/null
而且效果很好。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.