<分区>
Possible Duplicate:
How to determine whether a given Linux is 32 bit or 64 bit?
有谁知道如何创建一个 shell 脚本 sh 文件,如果它是 64 位系统则可以对一个程序进行 shell,如果是 32 位系统则可以对另一个程序进行 shell? 非常感谢。
<分区>
Possible Duplicate:
How to determine whether a given Linux is 32 bit or 64 bit?
有谁知道如何创建一个 shell 脚本 sh 文件,如果它是 64 位系统则可以对一个程序进行 shell,如果是 32 位系统则可以对另一个程序进行 shell? 非常感谢。
最佳答案
if $(uname -m | grep '64'); then
echo "ARCH: 64-bit"
else
echo "ARCH: 32-bit"
fi
关于linux - 用于检测系统是 32 位还是 64 位的 Shell 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12251049/