recursion is bad in shells scripts