Compare two files and get only missing names

I need to compare two files (oldfile1 & newfile). Need to ignore the values which are present in both files. At the same time, i need to get only records in new file.

Tried using Join -v1 -v2 oldfile1 newfile (suspect it has not worked as expected).

could anyone of you please help me here.

Show us your input and expected o/p. We will help you

Oldfile

LONDON
HUNGARY
Budapest
california

Newfile

HUNGARY
california
North carolina
India
LONDON
Budapest
Switzerland

Output should be:

North carolina
India
Switzerland

Please use codetag

try

$ grep -v -f oldfile  newfile

OR

$ awk 'FNR==NR{A[$0]++;next}!($0 in A)' oldfile newfile

Resulting

North carolina
India
Switzerland

yeah.. thank you so much, itworked...

You could also use comm command if your files were sorted or you could do something like this to sort them first. Note your output would also be sorted.

comm -23 <(sort newfile) <(sort oldfile)
India
North carolina
Switzerland