The key is in the output.
This:
produces an output which contains spaces, so, if will complain that there are too many arguments. Quoting when working with strings is a good thing to do.
On the contrary:
This other command produces a single word as output. So, it will work even if you don't quote it correctly. In any case, it wouldn't hurt either to quote it. So, let's modify the code this way:
Code:
If [ "`uname -a | grep 64`" ]
then
echo 64bit
fi
However, I think that you should be parsing "uname -m" instead. There are lots of ways that a 64 could appear even if you are not using a 64 bits kernel so "uname -m" might be more accurate. It should say "x86_64".