in reply to Re: Automatic scp
in thread Automatic scp

A quick test with OpenSSH shows this to work, using
scp -B $file $user\@$host:$target
The -B on OpenSSH is equiv to your -f