How to get the lines of text in a txt file, if I compare 2 text files. I have 2 test files. mba.txt and mbanew.txt
mba.txt
Pre-Validation/SalesandServiceinvoicing,SalesandServiceinvoicing
Pre-Validation/SalesandServiceinvoicing/Salesinvoice,Salesinvoice
IDT-BTStarProject,IDT-BTStarProject,IDT
mbanew.txt
Pre-Validation/SalesandServiceinvoicing,SalesandServiceinvoicing
Pre-Validation/SalesandServiceinvoicing/Salesinvoice,Salesinvoice
IDT-BTStarProject,IDT-BTStarProject,IDT
IDT-BTStarProject/BBP,BBP
IDT-BTStarProject/ARIS,ARIS
IDT-BTStarProject/Servicetaxratemaster,Servicetaxratemaster
So i want to find out how many lines of text file have been missed out in mbanew.txt and i need get those text lines. here in the above example, my answer is 2 and the output should be :
IDT-BTStarProject/BBP,BBP
IDT-BTStarProject/ARIS,ARIS
IDT-BTStarProject/Servicetaxratemaster,Servicetaxratemaster
I tried with this code in PowerShell
cls
compare-Object -referenceobject $(get-content "D:\mba.txt") -differenceobject $(get-content "D:\mbanew.txt")
but in vain.