title: Shell: How to use screen and wait for a couple of background processes in a shell script
body: <p>I am writing a shell script for a couple of long running processes. 
  First of all I need to run all commands in the screen session manager, so that the execution of a process does not end if a user has been disconnected. 
  Later I need wait for some background processes, which has been created before, to end, so that the following process can start.</p>
  
  <p>My question is how to start a screen session in a shell script and wait for the background processes to end.</p>