Is there a way to check within a shell script (ksh) whether or not the script was started in the current shell?
Example
Start script in current shell with .
(dot/source) command
$ . ./myscript
$ I run in the current environment!
Start script in own process
$ ./myscript
$ I run in my own process!