我想打电话从庆典的期待脚本方式如下: #!/bin/bash
mkfifo foobar
expectScript > foobar &
# other stuff that does stuff with foobar
什么expectScript需要做的是ssh到远程主机。从那里它需要ssh到另一个远程主机。然后它需要将用户切换到根(不允许root登录)。然后它需要发出一个最终需要
我试图从bash/linux下的fifo中读取一个简短的python脚本,然后在收到某个单词时停止。我已经做了以下 在main.py import "sys"
while True:
line = sys.stdin.readline().rstrip()
sys.stdout.write(line + " read\n")
if line=="STOP":