know question is not clear at a glance, i have this table:
ID Start End
1 1 4
2 2 5
3 4 9
4 8 10
I want to set these in an order (illustration below). I need an array that its indices will increment by one with respect to start and the end positions, and get the greatest index of all. For example:
1. ####
2. ####
3. ######
4. ###
so array will be;
array =(1,2,2,3,2,1,1,2,2,1)
i did not start to write anything because i could not figure whether that is possible with bash. please advice..