views:

36

answers:

1

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?

+4  A: 

Add -d -m to the screen command.

Ignacio Vazquez-Abrams
can you please give an example
Guy
`screen -d -m ...`
Ignacio Vazquez-Abrams
works like a charm - thanks man!
Guy