$$ is an internal variable, it stores the process ID of the script itself or the current bash instance.

Here is an example use case

echo $$
Code language: PHP (php)

The output prompted.

darryl@Darryl-PC$ echo $$ 8
Code language: CSS (css)

 

Darryl Dias

I’m Darryl. I’m a 3D Artist, Programmer and Linux enthusiast. On this site I share my insights, tips and tricks, tutorials, methods and best practices.

Leave a comment

Your email address will not be published. Required fields are marked *