The solution was non-obvious but I finally found the hint I needed... Escape the git internal variables, i.e.: \$sm_path so bash doesn't expand them so they are still passed to 'git submodule foreach'

Thanks,
Richard