#!/bin/bash
command1 &
command2 &
command3 &
wait
command4
wait (sem nenhum argumento) aguardará até que todos os processos em segundo plano tenham sido encerrados.
A descrição completa de wait no manual bash :
wait [-n] [n ...]Wait for each specified child process and return its termination status. Each
nmay be a process ID or a job specification; if a job spec is given, all processes in that job's pipeline are waited for. Ifnis not given, all currently active child processes are waited for, and the return status is zero. If the-noption is supplied,waitwaits for any job to terminate and returns its exit status. Ifnspecifies a non-existent process or job, the return status is 127. Otherwise, the return status is the exit status of the last process or job waited for.