2
通過telnet(在遠程服務器上沒有ssh)運行「遠程」shell,我需要等待遠程shell結束髮送連接關閉I/O「睡眠」 。Linux如何等待遠程pid(telnet)
。 my_local_shell |遠程登錄
#!bin/bash
# run remote shell
echo "remote_shell.sh \"required_parameters\""
sleep 30
echo close XX
我需要相當類似:
# run remote shell
echo "remote_shell.sh \"required_parameters\" &"
echo "wait $!"
echo close XX
但我無法得到它的工作,因爲我想遠程pid是「混合」與當地的一個。
如何實現這一目標?
thx這個解釋(擴展),我得到它的工作時逃避$與一個單一的遠程過程。關鍵是遠程shell也運行孩子,等待相同的PID,並且在那裏我掙扎着。但我會在父母/孩子的pid中進一步研究。我已經看到一些關於這[這裏]的好文檔(http://mywiki.wooledge.org/EnglishFrontPage) – hornetbzz 2011-03-05 05:45:16