newb shell question

I know this is a total begginer question but what is wrong with this picture. My loop wont loop, it just drops me back to the prompt and gives the error "unary operator expected". Any help would be appreciated.

here it is,

#!/bin/sh
selection=
while [ $selection -ne9 ]
do
cat << MENU
1)List files in current directory
2)Display pwd
3)Remove a directory
4)Create a directory
5)Copy a file
6)Remove a file
7)Change directory
8)Mail file to user
9)EXIT
MENU
echo "Enter selection:\c"
read selection
echo "the user selected option $selection"
if [ $selection -eq 1 ]
then
ls
elif [ $selection -eq 2 ]
then
pwd
elif [ $selection -eq 3 ]
then
echo "Name of dir to delete"
read option3
rm -r $option3
elif [ $selection -eq 4 ]
then
echo "Name of dir to create"
read option4
mkdir $option4
elif [ $selection -eq 5 ]
then
echo "Name of file to copy"
read option5
echo "Where to move it to?"
read option55
cp -r $option5 $option55
elif [ $selection -eq 6 ]
then
echo "Name of file to delete"
read option6
rm -r $option6
elif [ $selection -eq 7 ]
then
echo "Name of directory to change to"
read option7
cd $option7
pwd
elif [ $selection -eq 8 ]
then
echo "Name of file to send"
read option8
echo "Who to send it to"
read option88
mailx $option8 < $option88
elif [ $selection -eq 9 ]
then
exit
else
echo "Please enter a valid selection"
fi
done

The first think I'm seeing is the while statement at the top...

selection=
while [ $selection -ne9 ]

First one:
I always use quotes - to be safe.
And check your spacing...
while [ "$selection" -ne "9" ]

Also though, you just defined $selection as being nothing... it would look like this when expanded:

while [ -ne 9 ]

Try:
selection=0
while [ "$selection" -ne "9" ]

Also, it'll make it cleaner to use a "case" statement, instead of a bunch of "if"s...

case $selection in
1) do_something ;;
2) do_something_else ;;
*) default_at_end ;;
esac

Hope that gets you back on the right track...

Thanks for the pointers, Ive tweaked it and it seems to be working now. But at 3am last night i had no idea what was going on. lol