How can a Bash script safely return when sourced or exit when run directly?
I have a Bash script that may either be executed directly or sourced into the current shell. When it finishes, I need it to use `return` in the…
I have a Bash script that may either be executed directly or sourced into the current shell. When it finishes, I need it to use `return` in the…
I have a Bash script that can either be executed directly or sourced into the current shell. When it finishes, I want it to use `return` if it…