Script help !!

Hey,

cd /clocal/user/absolute/

if [ -f tempdspmq.txt.* ] then
rm tempdspmq.txt.*
fi

echo "I am here" > tempdspmq.txt.$$

I am first entering into the disired location, then before writing into the existing temp file i wanted to delete the file, then after creating the fresh file with new process id.
tempdspmq.txt.$$, $$ shows the temp file with unique process id (each time script runs).

I want to ask, will this work ??
Please guide me.
Thanks in advance.

:b:

Just a couple of tweaks ... the below works ..

#!/bin/ksh
set -x
cd .

if [ -f tempdspmq.txt.* ];then
rm tempdspmq.txt.*
echo " just removed file"
fi

echo "I am here" > tempdspmq.txt.$$