Skip to content

Instantly share code, notes, and snippets.

@smerritt
Created January 11, 2010 21:38
Show Gist options
  • Save smerritt/274632 to your computer and use it in GitHub Desktop.
Save smerritt/274632 to your computer and use it in GitHub Desktop.
#!/bin/bash
sleep 2 && echo "done 1" &
sleep 5 && echo "done 2" &
sleep 2 && echo "done 3" &
wait %1 %3
echo "done waiting for short-running processes"
wait %2
echo "done waiting for long-running process"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment