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