Paca
Paca

Reputation:

Shell script + simulation keyboard key presed

I have a simple question.

Is that possible to simulate an keyboard action ie: ctrl-a d for detach a screen in a script,

I need this to check in the screen the folowing keyword "SEGFAULT" an then restart the processus.

If you have any suggestion...

Best regards

Paca

Upvotes: 2

Views: 568

Answers (1)

Bob Somers
Bob Somers

Reputation: 7306

This is exactly what Expect was written for. :)

Upvotes: 3

Related Questions