LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? (https://www.linuxquestions.org/questions/linux-general-1/create-file-using-touch-tmp-%24%24-file-tmp-3941-is-created-why-169449/)

huangyanfeng 04-13-2004 03:09 AM

Create file using 'touch ./tmp.$$', file tmp.3941 is created, why?
 
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why?

Tinkster 04-13-2004 03:36 AM

Because $$ is a bash-variable, it hold the PID of
the process invoking it, in other words, the pid of
the shell you used to touch. It will vary in other
shells ;)


Cheers,
Tink


All times are GMT -5. The time now is 06:48 PM.