Use the awk 'NF' (number of fields) built-in variable as an easy way to get the last field of a multi-word output. Here is an example using Mac OS X's hdiutil command to get just the calculated checksum of a disk image.
$ foo=`hdiutil checksum -type UDIF-CRC32 myimage.dmg` ¬
$ echo $foo | awk '{print $NF}' ¬
$5C63390B