3 ms·
You can use `wait` to wait for jobs to finish. some_command & some_other_command & wait
by R0flcopt3r 5y ago
You can use `wait` to wait for jobs to finish.
some_command &
some_other_command &
wait
- masklinn 5y agoOne issue with that is it won't reflect the failure of those commands. In bash you can fix that by looping around, checking for status 127, and using `-n` (which waits for the first job of the set to complete), but not all shells have `-n`.