I have a simple text file having payment amount value on each line. At the end of day 'n' number of payments created difference in amount that I need to match from this file.
I have information about how many payments created difference and difference amount. Please help me to build shell script to find these any combination of 'n' records matching target value.
For example file is:
1.0
25.5
75.5
8.10
100.25
145.67
88.12
and I want to find sum of any 3 values matching target value of 201.25
so expected result is