Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can use `wait` to wait for jobs to finish.

    some_command &
    some_other_command &
    wait


One 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`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: