Im trying to compare 2 csv files for patterns and remove one line that exist in both files recursively within Linux. Im trying to only compare certain columns and there may be more than one instance of the same amount Im trying to pair. This is where Im having the most trouble, as I only want to whack out one of the lines if a match occurs and not all of that same string. Example:
File 1> 01/02/2013,"BANKCARDMTOT DISC CO REF- 524771001329272",27082,(19.95),,
File 2 > "01/01/2013",,"Php webhosting","Telephone Expense",,"19.95",,, 05/02/2013,"BANKCARDMTOT DISC CO REF- 524771001329272",27034,(19.95),,
I want to take column 4 and remove the () then whack out one instance of that amount in file 2 looking in column 4 and removing the "". As you can see in my example there are 2 instances of 19.95, but I want to remove only one. Then if 19.95 comes up again it removes the next instance and so on.
Further, I dont know if its possible to use a date range as well for finding which file to whack as the dates should be within 45 days.