**Can I transfer this first format to the second one just by basic shell procession or awk or sed on linux? This is a toy example:**

This kind of text file is what I have, three cols, col2 and col3 like range, left close and right open,    
chr1 0 2 0    
chr1 2 6 1.5    
chr2 0 3 0    
chr2 3 10 2.1

Transfer to describe each position as:    
chr1 0 0    
chr1 1 0   
chr1 2 1.5    
chr1 3 1.5    
chr1 4 1.5    
chr1 5 1.5    
chr2 0 0        
chr2 1 0    
chr2 2 0      
chr2 3 2.1    
...    
chr2 9 2.1  

Someone has idea how to solve? Thanks!!! 
Try:

    awk -F "\t" -v OFS="\t" '{while ($2 < $3) { print $1,$2,$4; ++$2 }}' test.txt

  
or

    awk -F "\t" -v OFS="\t" '{for ($2=$2; $2<$3;$2++) {print $1,$2,$4}}' test.txt

output:

    chr1	0	0
    chr1	1	0
    chr1	2	1.5
    chr1	3	1.5
    chr1	4	1.5
    chr1	5	1.5
    chr2	0	0
    chr2	1	0
    chr2	2	0
    chr2	3	2.1
    chr2	4	2.1
    chr2	5	2.1
    chr2	6	2.1
    chr2	7	2.1
    chr2	8	2.1
    chr2	9	2.1

