Hi, is there any way I can tell how a script was started?
To explain further. I have written a 'wrapper' shell script
that starts numerous other existing utility scripts. I want the called 'utility scripts' to act slightly differently depending on how they were started. I need to determine if the 'utility script' was started by the 'wrapper script' or if it was just started via someone invoking it from their shell via the command line. The 'wrapper script' is also invoked via the shell command line.
Currently, I pass in an extra arg to the 'utility scripts' when started via the 'wrapper script' and use this in the 'utility script' to determine how it was started. I wonder if there is a better way. Thank you...