bash only allows you to start variables with letters. You can have a number in the variable, but not at the begiinging. the varaiable d4='something' will be ok, but 4d='something' will not work. So you numbers 0 and 1 you used will not work
you want to use a while loop, which you have is not a loop. it will just test for something one time. Your if then is also a little off.
you have
if [$1= ]; then
echo "Please enter in a name"
fi
bash is kind of picky. you need to have a space on each side of the bracket. You also need to add quotes like this
if [ "$D" = "" ]; then
echo "Please enter a name"
fi
what you are looking for is a while loop(I think) This will promt for a answer if a name is not set to the variable. It will keep asking until the variable is set. The following code only gets a name from the user and sets it to the variable $NAME
echo "enter a name to search for"
read NAME
while [ "$NAME" = "" ]: do
echo "enter a name to search for"
read NAME
done
I am just a novice myself, but this is a pretty easy assignment you got .You definetly need to brush up on the basics. I would highly reccomend this onlline guide. http://www.tldp.org/LDP/abs/html/
sections 2-10 will give you a good grasp of wht you need to know. after that this will be much easier for you.
Even if you do not want to read I am willing to help, I have fun doing it.