while read line
do
msg="File 1 contains "
msg2="$msg$(grep "$line" file1.txt | cut -d ' ' -f 1)"
if [ ${#msg2} -ne ${#msg} ]; then
echo $msg2
fi
done < file2.txt
Arquivo 1
ns1.cloudns.net. -17554 IN A 85.159.233.17
ns1.cloudns.net. -17554 IN AAAA 2a00:1768:1001:9::1
www.alweya.com. -335336 IN A 192.69.217.246
Arquivo 2
alweya.com