function round(){ [ "$2" = "" ] && NUM=3 || NUM=$2; echo $1 | sed "s/\([[:digit:]]*\.[[:digit:]]\{,$NUM\}\).*/\1/"; }
function sin(){ echo "scale=10; s($1*a(1)/45);" | bc -l; }
function cos(){ echo "scale=10; c($1*a(1)/45);" | bc -l; }
function tan(){ echo "scale=10; arg=$1*a(1)/45; s(arg)/c(arg);" | bc -l; }
function ln(){ echo "scale=10; l($1);" | bc -l; }
function log(){ echo "scale=10; l($1)/l(10);" | bc -l; }
function pow(){ echo "scale=10; $1^$2;" | bc -l; }
function sqrt(){ echo "scale=10; sqrt($1);" | bc -l; }
function exp(){ echo "scale=10; e($1);" | bc -l; }
alias pi="echo 'scale=10; a(1)*4;' | bc -l"
export pi=$(pi)
Теперь в командной строке можно делать простенькие вычисления.