Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

How to convert multiple number ranges into sequence?

$
0
0
Looking for a simple way to convert ranges to a numerical sequence that would assign the original value of the range to the individual numbers that are on the range.
Thank you
Code:

given data

13196-13199    0
13200          4
13201          10
13202-13207    3
13208-13210    7

desired output

13196  0
13197  0
13198  0
13199  0
13201  10
13202  3
13203  3
13204  3
13205  3
13206  3
13207  3
13208  7
13209  7
13210  7


Viewing all articles
Browse latest Browse all 16232

Trending Articles