Within a script, $$ represents the Process ID of the currently running script. This allows unique file names for temporary files created by the script. For example
/tmp/temp.$$