EN
Bash - detect machine architecture (x86/x64)
8
points
In this short article, we would like to show how to check used machine architecture under Bash.
Quick solution:
#!/bin/bash
case "$(uname -m)" in
*64*) echo '64bit' ;;
*686*) echo '32bit' ;;
*386*) echo '32bit' ;;
*) echo '64bit' ;;
esac