[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Redhat Linux versions
From: |
Samba |
Subject: |
RE: Redhat Linux versions |
Date: |
Sat, 12 May 2007 21:56:38 +0530 |
Thank u very much bob
Thanks and regards
Samba
Four Soft Ltd
+91 40 23100600 / 601 ext 6111/ 6222
-----Original Message-----
From: Bob Proulx [mailto:address@hidden
Sent: Saturday, May 12, 2007 9:08 PM
To: Samba
Cc: address@hidden
Subject: Re: Redhat Linux versions
Samba wrote:
> No I am asking using uname command option to check the OS bit
versions.
The uname command may be used to report the kernel uname data in the
utsname structure. Use of data from this structure other than the
system name is not portable because different operating systems record
different information there.
man 2 uname
The 'uname -m' option will return the machine hardware name. There
are many possibilities for a 32-bit or 64-bit system. Here is one
possibility that first checks the system name and then checks the
output from -m after the system name is known. Doing it this way
avoids some of the portability problems.
case $(uname) in
Linux)
case $(uname -m) in
x86_64|ia64) echo "64-bit" ;;
i386|i486|i586|i686) echo "32-bit" ;;
*) echo "machine not in list" 1>&2 ;;
esac
*)
echo "system not in list" 1>&2
;;
esac
But there are probably better ways to do it. List based systems are
generally bad because the list is almost always out of date
immediately.
Bob
"The information contained in this communication is intended solely for the use
of the individual or entity to whom it is addressed and others authorized to
receive it. It may contain confidential or legally privileged information and
may not be disclosed to anyone else. If you are not the intended recipient you
are hereby notified that any disclosure, copying, distribution or taking any
action in reliance on the contents of this information is strictly prohibited
and may be unlawful. If you have received this communication in error, please
notify us immediately by responding to the sender of this email and then delete
it from your system. Four Soft is neither liable for the proper and complete
transmission of the information contained in this communication nor for any
delay in its receipt"..