linux shell判断当前环境是32位还是64位

141 阅读1分钟

通过uname判断

platform=`uname -m`
if [ $platform='x86_64' ]
then
        echo 64
else
        echo 32
fi