Check if script was started in current shell
2267
How to detect if a script is being sourced
119181
How to debug bash script?
141045
Linux Script to check if process is running and act on the result
92037
Auto confirm when running bash scripts?
26623
How to monitor a folder and trigger a command-line action when a file is created or edited?
106972
tell if last command was empty in PROMPT_COMMAND
51749
What's the best way to determine the location of the current PowerShell script?
96052
How can I detect if I'm in a subshell?
23508
Script at Startup
19553
Detect init system using the shell
20082
Does the shebang determine the shell which runs the script?
40037
How to detect the OS from a Bash script?
137379
How to get the PID of my script?
65449
How to get the pid of the last executed command in shell script?
121426
How to know if the system console is open?
10754
determining path to sourced shell script
5876
Detecting how a batch file was executed