The probably closest syntax to that is:
p_out='/some/path' arg_1='5' my_script Update 1
Nearly a decade later I realize that it gets much closer than that (not sure whether it already was back then).
man -P 'less -p "^\s+set \["' bash set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...] -kAll arguments in the form of assignment statements are placed in the environment for a command, not just those that precede the command name.
So you can do this, too:
set -k my_script p_out='/some/path' arg_1='5' A bit more complicated but safer:
if [[ $- =~ k ]]; then # set -k has already been set so no need to reverse it after the command my_script p_out='/some/path' arg_1='5' else set -k my_script p_out='/some/path' arg_1='5' set +k fi You can test this with:
set -k echo "\$foo: '$foo'"; bash -c 'echo $foo' foo=bar