file rename

I am very new to Linux shell scripting and would be grateful if someone could help me with this
I have the following so far
-----------------------------------------

#!/bin/bash
set -e
f="$1"
out="$2"
for f; do
if [ -e *.tiff ]
then
mv $f ${f%.tiff}.pdf 

#I want to rename the file if it has tiff extension to pdf. which the above command I think does. 
#However I want to move it to /tmp folder. 
#I then want that file name to be next to "-if" in the below command 
/opt/ocr  -if ${f%.tiff}.pdf  -of ${out}
rm ${f%.tiff}.pdf
fi

------------------------------------------

many thanks for looking.

Your code has several errors, the for statement needs a closing "done" on the last line, for example. Let's forget the loop for now.

Assume you have two parameters:
/path/to/farkle.tiff (this is $1) /path/to/farkle.pdf (this is $2)

Then I think you want something like this:

#!/bin/bash

# is the file name a .pdf
echo "$1" | grep -qF '.tiff'
if [ $? -eq 0 ] ; then    # it is pdf, so, rename it and put in /tmp
   mv $1  $2                       
   mv $2 /tmp/$(basename $2)
fi

many thanks