Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Code for comparing 2 txt files that are pipe delimited

I have 2 files, A.txt (current day data) b.txt (previous day's data)

  • A contains data like 1 2 3 4
  • B contains data like 1 3 5

Output 2 4 5

Basically delete the common data from both the files and print uncommon data to another file.

Also after the above I need to see which line is added and which line is deleted from file a by checking it with file b. After that I need to copy a data to b so that next day when I get file a (today file) it checks with b (yesterday's file) again. For instance from example: 2 and 4 are added and 5 is deleted I need to see output like this.

Comments