if cat A A B | sort | uniq -c | egrep -e '^[[:space:]]*2[[:space:]]' > /dev/null; then
echo "A has lines that are not in B."
fi
If you do not redirect the output, you will get a list of all the lines that are in A that are not in B (except that each line will have a 2front if it is). This depends on the lines in B being unique and the lines in B being unique.
If this is not the case, and you do not care about counting duplicates, it is relatively easy to convert each file to a list of unique lines using sortand uniq.
source
share