In the following script block, I attempt to execute an nslookup on each fqdn being read from a file. However, the script stops after executing the first nslookup command. Code:
for HOST in `cat ./rhel_hosts`
do
echo;
echo "EXECUTING ==> nslookup ${HOST}"
CMD="nslookup ${HOST}"
exec $CMD
done
Any idea why there is no subsequent execution of the nslookup command?