I once read that one way to obtain a unique filename in a shell for temp files was to use a double dollar sign (
$$
$$
In Bash $$
is the process ID, as noted in the comments it is not safe to use as a temp filename for a variety of reasons.
For temporary file names, use the mktemp
command.