Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shell cygwin xterm从脚本打开多会话_Shell_Cygwin_Ksh_Rhel - Fatal编程技术网

Shell cygwin xterm从脚本打开多会话

Shell cygwin xterm从脚本打开多会话,shell,cygwin,ksh,rhel,Shell,Cygwin,Ksh,Rhel,我有.ksh脚本,其中包含以下命令,用于在不同服务器上打开多个会话,但无法同时并行执行文件。有帮助吗 xterm -e ssh appuser@appserver1; cd /usr/bin/; ./script1.ksh sleep 5 & xterm -e ssh appusr@appserver2; cd /usr/bin/; ./script2.ksh 其中cd和脚本[12].ksh命令应在远程主机上运行 无法同时查看在两个不同窗口上运行/执行的脚本 我试过下面的命令,但

我有.ksh脚本,其中包含以下命令,用于在不同服务器上打开多个会话,但无法同时并行执行文件。有帮助吗

 xterm -e ssh appuser@appserver1; cd /usr/bin/; ./script1.ksh sleep 5 &
 xterm -e ssh appusr@appserver2; cd /usr/bin/; ./script2.ksh 
其中cd和脚本[12].ksh命令应在远程主机上运行

无法同时查看在两个不同窗口上运行/执行的脚本

我试过下面的命令,但它同时打开两个会话,而不是并行的。比如不同时打开两个窗口来执行会话

xterm -hold -e ssh appuser@appserver1 'cd /usr/bin;./adauto.sh psswd &'
xterm -hold -e ssh appuser@appserver2 'cd /usr/bin;./adauto.sh psswd;'
谢谢, SM

您所说的“不能同时执行文件并行”是什么意思。第一次cmd结束时的
&
是否正常工作?您是否尝试了
xterm-eshappuser@appserver1'cd/usr/bin//脚本1.ksh;睡眠5'&
?(可能还有其他报价选项)。请用这些信息更新你的Q,不要在评论中回复。祝你好运。你说的“不能同时执行文件并行”是什么意思。第一次cmd结束时的
&
是否正常工作?您是否尝试了
xterm-eshappuser@appserver1'cd/usr/bin//脚本1.ksh;睡眠5'&
?(可能还有其他报价选项)。请用这些信息更新你的Q,不要在评论中回复。祝你好运