Shell script not waiting

2019-08-08 15:46发布

问题:

 ssh user@myserver.com<<EOF
    cd ../../my/path/
    sh runscript.sh
    wait
    cd ../../temp/path
    sh secondscript.sh
 EOF

The first script runs and asks me the questions in that script, but before i'm even able to start typing to answer them the second script starts running. From what I'm reading this shouldn't be happening even without the wait.

标签: shell wait