I have a file : cat test.txt
I have another file compare.txt, where I am trying to compare each number above and if it doesnot exist I need to get an output - Doesnot exist
My script is giving me an error
for i in `cat test.txt`
if [ "$(egrep $i compare.txt)" -eq 0 ]; then
echo "$i doesnot exist"
Can someone please help