I was trying to make a recursive function that can calculate the Fibonacci of the enter number, by the way I got stuck on how to get the values obtained by the recursion.
<
I ran your code and I see that the numbers don't get returned when it is less than 2. It keeps decrementing the values and goes on to finding fibonacci of negative numbers. And probably that is the reason why it is giving strange results (this is after applying the fix given by Armali).
I am not sure if the syntax of these arithmetic operations are right as you have also pointed out in the line where you add results from the methods.
Check out this link which shows recursive function in bash but it prints the value rather than return. http://tldp.org/LDP/abs/html/recurnolocvar.html
What I understand is, there is some problem in the way the local variables are handled in bash recursive script. I see that when the function is calling the second time after the second decrement, the return value of the first call is over-writing the original number value leading to negative numbers and hence strange results. There must be some other way to handle return values in recursive calls.