shell – How to do integer & float calculations, in bash or other languages/frameworks? – Unix & Linux Stack Exchange Posted on October 12, 2016 by sampson $ echo 20+5/2 | bc22$ echo ‘scale=4;20+5/2’ | bc22.5000 Source: shell – How to do integer & float calculations, in bash or other languages/frameworks? – Unix & Linux Stack Exchange