Link to home
Start Free TrialLog in
Avatar of nicky s
nicky sFlag for United States of America

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"
ASKER CERTIFIED SOLUTION
Avatar of jeremycrussell
jeremycrussell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial