hello
is it possible to check systsme architecture and also system OS versions?
like
32 bit centos 5
64 bit centos 6
how about cpu versions?
hello
is it possible to check systsme architecture and also system OS versions?
like
32 bit centos 5
64 bit centos 6
how about cpu versions?
Try
uname -m
i know uname
i want to check os and architecture with if
like if users machine is 32 bit and also centos version 5
so wget pack32-5
and for 64 and centos 6 same
I guess you parse output of u name -m
i dont need the output of uname -m
actually i had written this part last year now im thinking to new way IF YOU KNOW.
OS=`cat /etc/redhat-release|awk '{print int($3)}'`
bit=`uname -i`
if [ $bit = "i386" ] || [ $bit = "i686" ] || [ $bit = "i586" ] ; then
rpm -ivh $MIRROR/packages/$OS/i386/*
else
rpm -ivh $MIRROR/packages/$OS/x86_64/*
# cat /proc/cpuinfo
if grep -q '^flags.* lm ' /proc/cpuinfo
then
echo "64 bit processor"
else
echo "32 bit processor"
fi
Of course, this doesn't mean the OS is 64-bit just that the processor supports 64 bit