executing uname through shell script

Hi,
I need to write a shell script that executes the command
uname -a

the output i get is of the format :
FreeBSD test.trial.machine.com 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Mon Jan 28 14:31:56 GMT 2000 tester@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC i386

(this is all in a single line)
I need to read just the last word, that is i386

Please help.

Thanks,
Himani

Run 'uname -i'. It will output just the hardware platform (in this case, i386).

Hi,
i tried 'uname -i' but i get an error saying that its an illegal option ..

hi,
its uname -m thats gives the hardware information.
thanks !! :stuck_out_tongue: