Skip to content

Instantly share code, notes, and snippets.

@sshimko
Created December 4, 2014 16:45
Show Gist options
  • Save sshimko/beff2a65ac4d937c672f to your computer and use it in GitHub Desktop.
Save sshimko/beff2a65ac4d937c672f to your computer and use it in GitHub Desktop.
BASH - export all variables and functions to subshells
export -a
for f in $(declare -F | awk '{ print $3; }'); do
eval declare -f -x $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment