#!/bin/bash function add() { #echo The first number was $1 #echo The second number was $2 ans=$[ $1 + $2 ]; #echo Returning $ans echo $ans } function HomeAndStaff() { if [ -d /home -a -d /staff ]; then return 0 # TRUE IS FALSE!! fi return 1 } total=`add 3 2` echo The total is $total numPrograms=` ps aux | cut -c64-80 | sort | uniq | wc -l` echo There are $numPrograms different programs running right now if HomeAndStaff; then echo All is Good else echo ALL is BAD fi # This does not work. Can you figure out why? function fib { if [ $1 -lt 2 ]; then echo fib $1 is 1 return 1 else # compute fib(n-1) let minus1=$1-1 fib $minus1 let a1=$? # compute fib(n-2) let minus2=$1-2 fib $minus2 let a2=$? let ans=$a1+$a2 echo fib $1 is $ans A1 is $a1 M1 is $minus1 A2 is $a2 M2 is $minus2 return $ans fi } fib 4 echo $?