Hi bgengine,
You ask for something that is difficult. You are asking that the SSH Client somehow know that the server is done with a command, but you won't tell it how to recognize the output when it is done. Suppose a command takes a few seconds, or outputs some, waits, outputs more, etc.?
[IMHO] The only way you can consistently do this is with one of the following, or a combination:
You see, from the program's perspective, it can only recognize the end based on what you tell it it should recognize as the end of a command.
If you find a way to compensate/prepare for all of that, I would love to see it! :)
pat
:)
You ask for something that is difficult. You are asking that the SSH Client somehow know that the server is done with a command, but you won't tell it how to recognize the output when it is done. Suppose a command takes a few seconds, or outputs some, waits, outputs more, etc.?
[IMHO] The only way you can consistently do this is with one of the following, or a combination:
- You tell the client what to look for in the return stream that signals the command is complete (this depends on the server quite a bit, as they all return something different-even based on the command(s) given), or
-
You give it a timeout period. "After 10 seconds, I am assuming you have the output, and I can send more. If not, oh well!"
You see, from the program's perspective, it can only recognize the end based on what you tell it it should recognize as the end of a command.
If you find a way to compensate/prepare for all of that, I would love to see it! :)
pat
:)