Can I do tail with Expectit over SSH?

39 views
Skip to first unread message

Orion

unread,
Aug 6, 2019, 2:16:45 PM8/6/19
to Yet another Expect for Java
I'm using example 

I want to do something like this:

  while (true) {
         System.out.println(expect.sendLine("tail -f /var/log/syslog").expect(contains("\n")).getBefore());
    }

What's the best way to do this?
Many thanks for any type of answer.
Reply all
Reply to author
Forward
0 new messages