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

通过uname判断

platform=`uname -m`
if [ $platform='x86_64' ]
then
        echo 64
else
        echo 32
fi
原文地址:https://www.cnblogs.com/yldf/p/11900078.html