Comparing all the contents of two files in Linux using Shell Program.

Let’s create first file with name file1.txt

I need to buy apples.
I need to run the laundry.
I need to wash the dog.
I need to get the car detailed.

 

Let’s create second file with name file2.txt

I need to buy apples.
I need to run the laundry.
I need to wash the dog.
I need to get the dog detailed.

 

The output will be shown as below