Skip to content

Instantly share code, notes, and snippets.

@o0-o
Last active May 7, 2019 02:29
Show Gist options
  • Save o0-o/3eea5cc8675d5a0bf4d62e59ac8b183e to your computer and use it in GitHub Desktop.
Save o0-o/3eea5cc8675d5a0bf4d62e59ac8b183e to your computer and use it in GitHub Desktop.
[CPU AES Support] Exit code reflects AES support #Shell
# cpu_aes.sh
( # linux
lscpu |
grep --quiet "aes" ||
# bsd
sysctl dev. |
grep --quiet "aes" ||
# macos
sysctl -n hw.optional.aes ) >/dev/null
) 2>/dev/null ||
exit 1 #aes is not supported or an error occurred
exit 0 #aes is supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment