How do I determine the process id of the current bash shell?
-
Man page for bash - GNU Bourne-Again SHell
Display the process id of the current shell, can be used within a shell script.
echo $$ 2240
Verify by using the usual way of checking your running process.
$ ps PID TTY TIME CMD 2240 pts/0 00:00:00 bash 2301 pts/0 00:00:00 ps
© Lightnetics 2024