wait $!

Category: Shell & Bash

wait $!

Wait for the last background process to finish

Waits specifically for the most recently started background process ($! holds its process ID) to finish.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.