Issue while using expect script in bash script -
i learned same site can embed expect script in bash script shown below:
echo $hostname /usr/bin/expect -<<eod spawn ssh "-o stricthostkeychecking no " bmaddi@10.102.238.158 sleep 5 expect "$*" send -- "scp \"-o stricthostkeychecking no\" file user@hostname: \r" expect "$*" send -- "exit \r" expect eof eod
when trying execute above script logs on host , stuff on there , come original host, facing following error:
invalid command name "eod" while executing "eod " . not recognizing eod end of usage of expect script , hence abruptly ending there. can 1 please suggest solution issue.
thank in advance.
Comments
Post a Comment