Created
September 9, 2017 21:27
-
-
Save miku/924c5e422726e4628d6f79333d48467f to your computer and use it in GitHub Desktop.
PID OS X min and max
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 | |
# https://apple.stackexchange.com/a/260798/2644 | |
pid=0 | |
for i in {1..100000}; do | |
: & | |
if [ $! -lt $pid ]; then | |
echo "Min pid: $!" | |
echo "Max pid: $pid" | |
break | |
fi | |
pid=$! | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment