Writing a bash script using host

Im trying to write a script using the host command but its not working properly. I cant understand what Im doing wrong. When I use it at the command prompt, it works fine. But its being used actually in the script, it says its not found: 2 SERVFAIL. Can anyone help me? Here's what I have so far: no matter which way I've tried it, its not reading the IP address. Im using yahoo's address as a reference.

host [-a] [hostname]

Hi,

Can you show us the command that you are using, the way you are using it and the output please ?

Here's the entire script:

echo -n "Enter your IP address:  "
read IP address
host -a
echo

Everything I run it, it says host not found

This give SERVFAIL? I'd imagine a usage message since you did not give that IP back to the host command.

read ip
host -a "$ip"

Ok. Thanks. Let me see how that works.

---------- Post updated at 05:55 PM ---------- Previous update was at 05:43 PM ----------

now it says:

host:  couldn't get an address for 'A' :  not found
./nslookup:  line 6:  69.147.76.15:  command not found

your file must be different than what you shown then...

Please post:
1) Operating System and Version.
2) Which Shell you are using.
3) The contents of the file /etc/resolv.conf . A Name Server Lookup can only work if your system has access to a Name Server. To look up Internet Addresses, this needs to be an Internet Name Server which is visible from your local network. The SERVFAIL message implies that you do not have a valid DNS (Domain Name Server) or that the DNS server has failed.
4) The actual contents of your script, what you typed to invoke the script verbatim, and any output.
5) The name of the script. The error message impiles that your script is called nslookup which is the name of a system command called by the host command. Change the name of your script!
6) Hmm, the error message refers to line 6 and your script as posted does not have 6 lines. Let's see what you actually executed.