#! /bin/bash function dupla() { res=$(echo "$1 * 2" | bc) } dupla 3 echo $res