Last active
February 3, 2020 22:46
-
-
Save treyharris/b008adf63fa82d5b22ae476a16876632 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# moshPids is an array of pids | |
for p in $moshPids; do | |
if [[ -n $interactive ]]; then | |
stty -echo | |
read -q "answer?Kill $p? (N/y)" | |
stty echo | |
echo >&2 | |
[[ "${answer}" == 'n' ]] && continue | |
fi | |
# do_kill set to print “killing $1” in debug | |
do_kill $p | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment