4

I want to write a bash script that opens multiple screens and detaches them. So at the end you'll have a few screens open each running a different command.

Similar to ssh:

ssh DESTINATION "command 1; command 2;"

my idea was to write something like this:

screen -S name1 "command1"
screen -S name2 "command2"
...

But this doesn't work.

ideas?

1 Answer 1

10

Add -d -m to the screen command.

Sign up to request clarification or add additional context in comments.

1 Comment

can you please give an example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.