Skip to content

Instantly share code, notes, and snippets.

@jcsrb
Created January 17, 2013 19:21
Show Gist options
  • Save jcsrb/4558780 to your computer and use it in GitHub Desktop.
Save jcsrb/4558780 to your computer and use it in GitHub Desktop.
fallback for core count
CPUCORECOUNT=$(cat /proc/cpuinfo | grep vendor_id | wc -l) && echo $(( CPUCORECOUNT == 0 ? 1 : CPUCORECOUNT ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment