#!/bin/sh # # shell_script.sh # MY_VAR="something" ./simulated_binary_executable.pl echo "Returned $?" echo "Exporting MY_VAR" export MY_VAR ./simulated_binary_executable.pl echo "Returned $?" exit 0