system <<"END"; export var=value ... some() {shell commands} /run/some/program END