call another shell script and pass parameters to that shell script

Hi,
I basically have 2 shell scripts.
One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system.
Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn.

Now, i want to run the first script and and get the variable value and pass that as parameter to anpother shell script, where that value is retrieved and used to connect.

Here r excerpts from 2 scripts:
-------------------------------------------------------------------------------------
script 1:

#!/bin/bash
read -p "enter ip of the remote system": ip

echo "Now calling expect script"
./script2.sh <i want to pass  the variable ip to the other script hat i am calling>

script 2:

#!/usr/bin/expect -f
spawn ssh -t <obtain the IP from the calling script i.e script 1.> "run_some_commands"

expect "passsword:"

send "password\r"

interact

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

Now, please can some one help me with the prblem tat i am facing.
is there any way to achieve the above.
How can i call script 2 from script 1 along with passing parameters (IPaddr), which will be referenced in the second script.

Appreciate your help!!

I don't know expect stuff but maybe give a try to

./script2.sh "$ip"
 spawn ssh -t $1 "run_some_commands"

You should not be using hardcoded plaintext passwords to login with ssh. They implemented measures to prevent people doing this -- which is why you had to brute-force it with expect. In other words it's a less-than-subtle hint that what you're doing is a really, really bad idea.

Google "passwordless ssh" and you'll find hundreds of examples for using keys, a safer and more secure mechanism that works automatically, no "expect" bludgeoning required.