I have a text file that contains 2 columns of numbers which are comma delimited, here is a sample
I need a unix script that does the following:
1) check the length of the number in the first column if it is not equal to 6 digits put "0" instead of the missing digit like 312 in the sample above would be 312000
2) then check the length of the number in the second column number if it is not equal to 6 digits, replace the missing digit/digits with 9 so the 316 in second column would be 316999
3)compare both the numbers in column 1 and 2 and if the number in column 2 is greater than the one in column 1 break the range and print all the numbers for example
I want the script to print the whole range like this:
finally want to put output of this in another text file called routes.