I came across "$$" expression in shell script, something like this
TFILE=$$
Can anyone tell me its meaning?
$$
means the process ID of the currently-running process.
It's the process id of the current process - see a previous question on StackOverflow for details: What does $$ mean in the shell?
$$ 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.
echo "$$" prints PID of current running process.
精彩评论