How about uname? `uname -a` gives all of it. See `man uname` for subsets and the ordering of the "-a" output. If you need more than just x86, I think any solution will be a bit involved.
AFAIK, uname only tells you what you are running, not what you *could* run. I.e. you couldn't tell the diffrence between a 32 bit os on a 64 bit capable machine or a 32 bit only machine.
Chris