Skip to content

Instantly share code, notes, and snippets.

@emres
Created December 20, 2013 10:37
Show Gist options
  • Save emres/8053089 to your computer and use it in GitHub Desktop.
Save emres/8053089 to your computer and use it in GitHub Desktop.
Prints how many prime ages you have left (that is, if you are 31 already.)
echo "You have, with high probability, at most" $(for age in {32..122}; do factor $age | cut -d' ' -f3 | grep -v "[0-9]\+"; done | wc -l) "prime birthdays left."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment