Возможное решение (которое, конечно, работает для вашего небольшого примера):
#!/bin/bash
# because File2.txt is bigger, it gets the main loop.
# read each line of File2.txt
while read string; do
# read each line of File1.txt
while read string2; do
# check match, and write if needed.
if [[ $string == *"$string2"* ]]; then
echo $string >> match_output.txt
echo "wrote "$string" to match_output.txt..."
fi
done < File1.txt
done < File2.txt