Validating inputs from a file

Hi,

I have a file called inputs. Now that file has the values like this:
1 2 3

Now In my script called 'get.sh' I do this :
exec < inputs
read a b c d

Now I know that there will not be any value in d. How can I check it. I need the exact condition for checking whether the variable has any value or not.

Thanks in advance

man test. Look for -z.

#! /bin/ksh

echo "ab bc cd" | while read a b c d
do
[ -z "$a" ] && echo "empty a" || echo "$a"
[ -z "$b" ] && echo "empty b" || echo "$b"
[ -z "$c" ] && echo "empty c" || echo "$c"
[ -z "$d" ] && echo "empty d" || echo "$d"
done