bash - Expect hangs after send -


expect hands after sending answer , no amount of "\r" cause enter not sure why

#!/usr/bin/expect set prompt "enter (yes or no):" set answer "yes" set timeout -1  spawn nc localhost 123  expect {     timeout     {puts "timed out"; exit 42}     "$prompt"   {send "$answer\r"; exp_continue}  } 

setting expect debug mode, reason, fixes hang issue cannot see issue using debugger.

my end goal pipe output nc named pipe. used expect because nc needs string before executing. need connection alive indefinitely why set in infinite loop


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -