I have a script in Bash called Script.sh that needs to know its own PID. In other words, I need to get PID inside Script.sh.
Script.sh
Any idea how to do this?
The variable $$ contains the PID.
$$