tags:

views:

219

answers:

3

I came across "$$" expression in shell script, something like this

TFILE=$$

Can anyone tell me its meaning?

+14  A: 

$$ means the process ID of the currently-running process.

Ether
Thank you, now the code is making sense !!!
vinit dhatrak
+5  A: 

It's the process id of the current process - see a previous question on StackOverflow for details: http://stackoverflow.com/questions/78493/-in-bash

teapot7
+1  A: 

$$ is the process id of the currently running process in UNIX.

mostly it is used with naming of logfiles aor temp files, such that there is no conflict of file names while multiple instances of the same scripts are running.

Venkataramesh Kommoju