1

arithmatic

view story
linux-howto

http://www.unix.com – Hi Guys, I am relatively new to scripting at the moment and am struggling to get the following function to work. For some reason it does not recognise the arithmatic symbol when i select option1. Any help would be greatly appreciated. Code: menu () { echo "==============" echo "Calculator" echo "==============" echo "1. Divide" echo "2. Multiply and Subtract" echo "3. Quit" read choice case $choice in 1) option1 ;; 2) option2 ;; 3) exit 0 ;; *) echo "invalid option" ;; esac } option1 () { a=$1 b=$2 c=$(($a/$b)) (HowTos)