Trapping $! output

hey all,

I have a script that creates and then distributes html files via scp on a 60 second cycle. On occasions the scp will hang and not complete with the cycle.

When running the scp command in the back ground it returns the PID. How do I trap $! in the script?

job=`echo $!` returns an error. 
-bash-3.00$ job=`echo $!` 
-bash: !`: event not found 

What I want to be able to do is monitor how long the scp runs for, if it is still running 2 minutes after starting then it is hung (can't just ps for the scp command as the scp script is used by multiple applications).

Any ideas?

Cheers,
Neil

just use it as $!

a=$!

Easy....feel a bit stupid now.

Cheers,
Neil