How to get the process ID (PID) of a shell script

Question: I want to know the process ID (PID) of the subshell under which my shell script is running. How can I find a PID in a bash shell script? When you execute a shell script, it will launch a process known as a subshell. As a child process of the main shell, a subshell … Continue reading How to get the process ID (PID) of a shell script
Continue reading…