Read a file with decimal numbers in bash

Hello,
I have the following script

while read id fraction
do
sambamba -h -f bam -t 10 --subsampling-seed=50 -s $frac ${id}.bam -o ${id}.out.bam
done < fraction.txt

where fraction.txt has two columns (id,fraction) and 50 rows

I am unable to run this as bash is not able to read the second column from fraction.txt as its in decimal. is there a way to make shell read decimal numbers ?

Many thanks

Perhaps:

 sambamba -h -f bam -t 10 --subsampling-seed=50 -s $fraction ${id}.bam -o ${id}.out.bam 
2 Likes

very silly of me ! :o

Thank you !