#!/bin/bash function recurse () { if [[ $1 -eq 0 ]] then echo -n 'in order to understand recursion, ' a=1 else echo -n 'one must first understand recursion, ' a=0 fi recurse ${a} } recurse 0