On 't2'
kirkby@t2:[~] $ arch -k
sun4v
On my own Sun Blade 2000
drkirkby@kestrel:[~] $ arch -k
sun4u
Is 'arch -k' supported on all platforms - linux, FreeBSD, OS X or
anything else we want Sage to work on?
I could test for Solaris first, then use 'arch -k' but if it's
universally implemented, then I'll do it in one step.
Dave
Debian GNU/Linux:
$ arch -k
arch: invalid option -- 'k'
Try `arch --help' for more information.
$ arch --help
Usage: arch [OPTION]...
Print machine architecture.
--help display this help and exit
--version output version information and exit
Report arch bugs to bug-co...@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report arch translation bugs to <http://translationproject.org/team/>
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinr...@jabber.ccc.de
Not on Ubuntu, apparently it has been deprecated upstream (in Debian?):
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/148511
They say to use "uname -m"
--
Carlo Hamalainen
http://carlo-hamalainen.net
No problem, I'll test for Solaris first - something like:
if [ `uname` - "SunOS" ]; then
if [ `arch -k` = "sun4v" ] ; then
<do what I to do>
fi
fi
I was going to ask on AIX and HP-UX groups too, just in case someone
decided to port to one of those platform. But there is no point if its
not even supported on some linux distros.
Thank you. Under the circumstances, I think I'll test for Solaris first,
though 'uname -m' does in fact work on Solaris.