Filter files by exact line anywhere in file

I have two files. L1 and L2. (each file, has one string per line without any spaces)

I would like to get those lines in L1 that are not present anywhere in L2.

No substring match, just exact line by line match but it can be anywhere in the file. (line 5 in L1 may be present in line 22 of L2, and so on)

Any script to help.

Ex.

L1:

a123
b123
c123

L2:

x123
a123
y123
z222
c123

So my output should be
L3:

b123

Take your pick:

fgrep -v -f L2 L1 > L3
fgrep -v -f L2 < L1 > L3

Your suggestions aren't quite correct. You need to use -x to ensure that substrings do not match, only entire lines.

Regards,
Alister