wait for ssh remote commands.
Hi,
I'm running a scripts that launches remotely another script with ssh. Here's the script: main.sh Code:
ssh user@remote "~/script1.sh" script1.sh Code:
java -jar pkg.jar Code:
java -jar prg.jar How can I add this capability? |
|
Why is it not possible to put both commands in a single script?
|
you can do something like this
script1.sh: Code:
java -jar pkg.jar Code:
VAR=`ssh user@remote "~/script1.sh"` |
A smarter answer better that KISS, is like Nylex said. Put everything in one script. This is simple, and does not use the command "sleep" that was really unnecessary.
|
My response was based on the assumption that there was a reason the scripts are separate. I don't like to answer a post with "you're doing it wrong" if I don't have detailed context.
|
nvm :p
|
zordrak, It's not you're doing wrong. I simply don't know when script1.sh would end. It can take minutes, just like it can take hours. I din't explain that because I just didn't remembered. Anyway, thanks for the help also.
|
By the way, not related to the post, it exists so many acronyms, that I simply don't understand all. The KISS acronym is new for me. And by the way, what nvm means?
|
Quote:
i posted something but it already been answered, and because i can't delete my post I edited to nvm ;) |
All times are GMT -5. The time now is 01:50 PM. |