ormaaj 1629506983 learn # f() if [ "$1" -ge 0 ]; then printf '%s ' "$1"; exec sh -c 'eval "${2}"; f "$(($1 - 1))" "$2"' _ "$@"; fi; f 9 "$(typeset -fp f)" # https://jeapostrophe.github.io/2012-05-28-exec-vs--post.html http://mywiki.wooledge.org/WrapperScript