Process id

I have a script say abc.sh
This script will run with different parameters say p1, p2,p3...

When i'm running the script with different parameters in different terminal, i'm getting different process id (as its the usual case)..

I want the same process id. Because with this process id i'm going to delete the temp files created by these scripts. The delete script is not deleting the files properly.

I have tried several options, but in vein... I need to delete the files only with the process id's

Can anybody help to resolve this

write the process id $$ in one file(in abc.sh). And read that file in your delete script

i'm using $$ only in delete script to delete the files.

I'm executing ./abc.sh p1 (p1 is the parameter passed to abc.sh) in one terminal and
./abc.sh p2 (p2 is the parameter passed to abc.sh) in another terminal...

In deleting script i'm deleting the temp files created by abc.sh. Since the abc.sh is running in different terminal, the process id's is different. So i'm unable to delete the temp files.

I need the process id's to be the same. Can anyone help me