using cksum

hi,

I am trying to use the cksum feature in unix. when i make a call to it i get returned something along the lines of:

4603435 14 file3

how do i get the first part of this response only; i.e:

4603435

I'm trying to use at a way without the use of sed and creating temp files. The manual doesn't seem to allow for picking out fields. If this isnt possible, the next simplest solution would be useful.

Thanks for your time

Lee

I often use functions in shell scripts to do this such as

first()
{
    echo $1
}

so if you do

A=`first one two three`

then A will be one.

i'm not sure i follow, how can i apply this to the cksum command?

#!/bin/sh

first()
{
   echo $1
}

for d in $@
do
     first `cksum $d`
done
cksum file | awk '{print $1}'