yitz_ 1246332225 learn $$ expands to the PID of the shell. In a () subshell, it expands to the process ID of the current shell, not the subshell. koala_man 1311935094 forget koala_man 1311935096 learn $$ expands to the PID of the shell. In a ( ) subshell, it expands to the process ID of the original shell, not the subshell. greycat 1350055623 forget greycat 1350055625 learn $$ expands to the PID of the shell. In a ( ) subshell, it expands to the process ID of the original shell, not the subshell. (Bash 4.0 and above have BASHPID for that.) institor 1691804471 forget institor 1691804483 learn expands to the PID of the shell. In a ( ) subshell, it expands to the process ID of the original shell, not the subshell. (Bash 4.0 and above have BASHPID for that.) emanuele6 1691805703 forget emanuele6 1691805713 learn $$ expands to the PID of the shell. In a ( ) subshell, it expands to the process ID of the original shell, not the subshell. (Bash 4.0 and above have BASHPID for that.)