nicky s
asked on
scripting
how can we make the variables of one script available for the other script
generally the otehr script is mainly has execute commands
put ${TMPDIR}/${ZIPFILE} ${TARGETDIR}/${ZIPFILE} gets from other script
#!/usr/bin/expect
spawn sftp user@servername
expect "password:"
send "password\n"
expect "sftp>"
send "pwd\n"
expect "sftp>"
send "put ${TMPDIR}/${ZIPFILE} ${TARGETDIR}/${ZIPFILE}\n"
expect "sftp>"
send "bye\n"
generally the otehr script is mainly has execute commands
put ${TMPDIR}/${ZIPFILE} ${TARGETDIR}/${ZIPFILE} gets from other script
#!/usr/bin/expect
spawn sftp user@servername
expect "password:"
send "password\n"
expect "sftp>"
send "pwd\n"
expect "sftp>"
send "put ${TMPDIR}/${ZIPFILE} ${TARGETDIR}/${ZIPFILE}\n"
expect "sftp>"
send "bye\n"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.