Dec-11-2020, 01:05 AM
I made 12 test files in a directory to the the script.
One of the files has 2(two) '100x02' error codes,
Second file has 2(two) '1001x03' error codes.
10 files do not have any 'error codes'
I'd like to print total number of each error.
script suppose to print only:
1. '100x02' is the error code and '2' is the total number of errors
2. '1001x03 ' is the error code and '2' is the total number of errors
I replaced
I just want total number of each error found in the files (al files)
Sorry for the confusion!
And I appreciate your help.
One of the files has 2(two) '100x02' error codes,
Second file has 2(two) '1001x03' error codes.
10 files do not have any 'error codes'
I'd like to print total number of each error.
script suppose to print only:
100x02 - 2 1001x03 - 2Where:
1. '100x02' is the error code and '2' is the total number of errors
2. '1001x03 ' is the error code and '2' is the total number of errors
I replaced
print(f"{e_el} - {count}")with
print(f"{cur_ef}: {e_el} - {count}")And now the script prints "File-error code - number of errors'
I just want total number of each error found in the files (al files)
Sorry for the confusion!
And I appreciate your help.