I have read all previous post about float numbers divisions in bash but I can't solve my problem...
I have this bash script:
lengthseq=$(sed -e 's/^\(>\).*//' sequence.fasta | sed '1d' | tr -d "\n" | awk '{ print length }')
lengthcodons=$("$lengthseq/3" | bc -l)
echo $lengthseq
echo $lengthcodons
Lengthseq it's ok. echo $lengthseq prints 2275859.
If I run it in konsole:
echo "2275859/3" | bc -l
758619.66666666666666666666
It's okay too.
So I don't understant why if I try it in my script, $lengthcodons generates and error.