I have an input file where each record - excluding the header and trailer - is numbered sequentially but doesn't necessarily start from 1. The file varies in size daily. The header and trailer both contain the count range for this list - "HEADER," followed by the 5-byte start range, followed by the 5-byte end range. There are rare times when a record or 2 is missing from the file. I need to find the numbers in the range that are missing. In the following example, the range is from 00015 to 00022. Record numbers 15, 18 and 22 are missing.
Input file:
HEADER0001500022
00016
00017
00019
00020
00021
TRAILR0001500022
Output:
00015
00018
00022
Is this possible with ICETOOL?