Help with loop in a shell script

I just want to write a little script, that reads the lines from a file, echos somthing in a new tmp.file and then do some commands whith the tmp.files.

 
while read -r line
do
echo "TEST=" > tmp.$$
echo "$line" >> tmp.$$
any_command < tmp.$$
done < $INPUTFILE

But I think I have to use somthing different than tmp.$$.
Any ideas?

Can you be a little bit more specific? Your statements are quite confusing. :confused:

Regards,

Praveen

$RANDOM 

will generate a random number which can be appended to your filename