Skip to content

Instantly share code, notes, and snippets.

@miku
Created September 9, 2017 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miku/924c5e422726e4628d6f79333d48467f to your computer and use it in GitHub Desktop.
Save miku/924c5e422726e4628d6f79333d48467f to your computer and use it in GitHub Desktop.
PID OS X min and max
#!/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