Created
June 23, 2020 23:38
-
-
Save tubaman/00b792221bd75fbbca61184da3d414ce to your computer and use it in GitHub Desktop.
waitpid for the linux command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Wait for a process(es) to finish by pid | |
# https://stackoverflow.com/a/41613532 | |
for pid in $@; do | |
tail --sleep-interval=0.250 --pid=$pid -f /dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment