I have a file1 which contains comma separated values (timein/timeout in military time format eg 0800, 0900, 1300). For each line of File 1 contains timein/timeout for each day.
Sample File 1:
Name, Position Level 3
0800, 1800
0900, 1200, 1230, 2000
0901, 2100
File 2 contains (hourly rate):
Position Level 1, 100
Position Level 2, 200
Position Level 3, 300
Position Level 4, 400
Position Level 5, 500
I need to create a File 3 with lines with the 1st time in and last timeout and number of hours rendered for each day displayed in each line of File3. And last line will display the monthly salary which will calculate the number of hours rendered for the month (sum of hours from each day) * the hourly rate.
File 3:
Name, Position Level 3
0800, 1800, 10
0900, 2000, 10.5
0901, 2100, 10.983
9444.9