I've already run a process, for example "fdisk /dev/sda" with the PID of "2000"
Now I execute expect script and I want expect to take control of stdin and stdout of my desired PID (2000) , so I can use "expect" and "send" command and interact with my process.
"spawn" command in expect normally create a process rather than connecting to it. but you can combine it with "open" command from tcl language but this command also opens files and some other things.
Any way to make this happen?
2 Reset to default