-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream data splitted in different ways. How to configure? #1329
Comments
I don't know why offhand they would differ, you could try also setting the other possible For your specific situation though, you should look into buffering a line at a time and then doing your checking and/or look into using different |
I tried the other Yeah I also thought about buffering. Thinking about the following logic:
Can this work reliably to recognize line by line and if it waits for input without a newline, then still treat the data received so far as one chunk to process it (e.g. checking for patterns etc.)? |
That's totally up to you. I can't make guarantees for arbitrary software. |
Thanks, keep up the great work 👍 |
I have 2 servers, on both is Ubuntu 22.04 installed.
On both servers I'm executing the same script, simplified version is:
On the first server I get this output:
On the second server I get this output:
On the first, the text "Do you want to continue? [Y/n]" is still together in one data event.
But on the second, the text "Do you want to continue?" is one data event, and the text "[Y/n]" is a separate data event.
Why the difference?
In my use case I check if the returned output contains some patterns, like "Do you want to continue? [Y/n]" or others.
If so, I write the appropriate response back to the stream.
But for this to work I've to rely on the output not splitted in the middle.
Can this behavior be configured? How to solve?
The text was updated successfully, but these errors were encountered: