Writing a bash script using host

view full story

http://www.unix.com – 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] (HowTos)