Tetszőleges tizedesszámra (t): t=${t:=2} h=$((x/y)); echo -n $h. while (( t-- )) do x=10*$((x-h*y)) h=$((x/y)) echo -n $h done echo Kerekíthetünk is, ha az utolsó osztást kivesszük a ciklusból.