Sunday, March 18

Start up multiple screen sessions running the same command

So a hosting company called fortuneCity were shutting down and someone had asked me to assist in backing up "Everything" from them to archive before they finally shut down.

They already was a set of scripts to pull the data down and to back it up elsewhere, but if you wanted to run more than one instance at a time you'd need to start each one manually.

This is silly if you know bash ;)

for I in {1..9}; do screen -d -m -S fortunecity$I ./ Smiley; done

Tada! Starts up 1 - 9 named sessions of screen running the command :)

No comments:

Search This Blog