PDA

View Full Version : [all variants] bash script arithmetic



magicmt
October 17th, 2008, 12:42 AM
the below script works with whole numbers, but not decimals. how do i get it to work with decimals?

#!/bin/bash
echo -n "enter a number "
read num
echo $[$num*3600-3]

akira86
October 17th, 2008, 02:00 AM
man bc
;-)