Dmi*_*rov 10
if grep -Fqvf file2 file1; then
    echo $"There are lines in file1 that don’t occur in file2."
fi
Grep选项意味着:
-F, --fixed-strings       PATTERN is a set of newline-separated fixed strings
-f, --file=FILE           obtain PATTERN from FILE
-v, --invert-match        select non-matching lines
-q, --quiet, --silent     suppress all normal output
你可以试试
awk -f a.awk file1 file2
哪里a.awk
BEGIN { IGNORECASE=1 }
NR==FNR {
    a[$0]++
    next
}
{
    for (i in a) 
        if (index($0,i)) 
            delete a[i]
}
END {
    for (i in a)
        print i
}