I'm trying to append and prepend commands to various functions. For example: #!/bin/bash wrapper () { echo "start of foo" echo "$1" echo "end of foo" } foo () { wrapper "$(echo 1; echo 2)" } foo The output is great, as desired: $ bash /tmp/script.sh start of foo 1 2 end o...