Issue
It's kind of easy question but I didn't find any information. What does mean $!
or $$
in bash?
For example: ps -p $!
or pstree $$
?
Solution
Actually, these variables were inherited by bash from the Bourne shell.
$$
means current PID.
$!
is the PID of the last program your shell ran in the background (e.g. myprog &
)
Here is a list of shell variables:
Answered By - paulsm4 Answer Checked By - David Marino (WPSolving Volunteer)