Compare 2 files

Hi ! :slight_smile:

I need to compare two files:

File1

aaa
ccc
rrrr
ggg
bbb

File2

rrr
bbb
ggg

the missing lines in file2 must be sent to file3, any idea?
Thanks in advance

look into 'man comm'

You can use " diff " and "cmp" It can use easily by

diff file 1 file2

cmp file1 file2

:slight_smile:

If you need to know more option you can use man page