Skip to content

Wait for linefeed with ShellStream.Expect #140

Closed
@rhegner

Description

@rhegner

I noticed that ShellStream.ReadLine() is not implemented using ShellStream.Expect(). I was wondering how I would wait for a linefeed using ShellStream.Expect()?

The reason for this is that I want to read from the shell line-by-line. And the end of a line can be a linefeed or a command promt.

So for reading a single line I tried this:

ShellStream.Expect(new Regex("\n|>"));

But it returns everything up to the next command promt and not just the first line. What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions