ormaaj 1348881356 learn # f() if [ "$1" -ge 0 ]; then printf "%s " "$1"; exec sh -c "${2}f "'$(($1 - 1)) "$2"' -- "$@"; fi; (f 9 "$(typeset -f f)"$'\n') # fake TCO ormaaj 1356891114 forget ormaaj 1356891123 learn http://jeapostrophe.github.com/blog/2012/05/28/exec-vs-system/ ormaaj 1356895017 forget ormaaj 1356895040 learn # f() if [ "$1" -ge 0 ]; then printf %s "$1"; exec dash -c "${2}f "'$(($1 - 1)) "$2"' _ "$@"; fi; (f 9 "$(typeset -f f)"$'\n'); printf %s\\n ' See: http://mywiki.wooledge.org/WrapperScript http://jeapostrophe.github.com/blog/2012/05/28/exec-vs-system/' ormaaj 1629506916 forget ormaaj 1629507005 learn #redirect ormaajtco