expect script inside shell script not working.

Shell Scipt: temp.sh

su - <$username>
expect pass.exp

Expect script: pass.exp

#!/usr/bin/expect -f
# Login 
#######################
expect "Password: " send "<$password>\r"

it comes up with Password: but doesnt take password passed throguh file.

Why are you using a third-party brute forcing utility to inject stored plaintext passwords into a login system that's supposed to be secure? This is what things like sudo are for...

got it and changed shell script which was my final objective for svn update.