Skip to content

Instantly share code, notes, and snippets.

@arc279
Created May 23, 2017 10:45
Show Gist options
  • Save arc279/5721b5885a9f2cba825596e6baadceec to your computer and use it in GitHub Desktop.
Save arc279/5721b5885a9f2cba825596e6baadceec to your computer and use it in GitHub Desktop.
source されたか判別
if [ "$0" = "$BASH_SOURCE" ]; then
echo "subshell!!"
else
echo "sourced!!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment