David Berger
David Berger

Reputation: 12823

Scripting for bash screen

I have processes that I background with screen. I'm trying to write a script that attaches to a terminal, executes a couple commands, then detaches. The problem is that when I attach to a terminal, screen directs control to the user. How do I work around this?

Upvotes: 0

Views: 3519

Answers (1)

Mark Probst
Mark Probst

Reputation: 7367

Screen has an option -X which you can use to remote-control a screen session from within a script. See, for example, here.

Upvotes: 4

Related Questions