Jump to navigation Jump to search
The word '$$' may refer to:
$$ as PID
echo $$ echo "My shell PID: $$" ps
3654 My shell PID: 3654 PID TTY TIME CMD 3654 pts/2 00:00:00 bash 4715 pts/2 00:00:00 ps
In above example 3654 is my bash shell pid.
$$ in subshell
In a () subshell, it expands to the process ID of the current shell, not the subshell.