我正在使用bash脚本在Ubuntu(14.04)服务器的远程拨号程序,我有一些重大的麻烦试图读取它的输出。 我想程序执行,因为我通常会有,然后我有超时命令杀死它,如下所示:
#!/usr/bash echo "begin" timeout 60s minicom Cisco -d Boston >> log.txt
我可以在控制台上单独运行上面的命令,但没有任何打嗝,但是当我通过bash运行它时,似乎没有发生任何事情,它经历了超时,但是我只是以log.txt结束了这些字符:
^[[0m^O
在bash脚本中,我有点儿绿色; 是否有附加从graphics工具输出输出的规则? 我真的很困惑,为什么它这样做。
从man minicom
-C, --capturefile=FILE filename. Open capture file at startup.
所以,干脆这样做:
#!/usr/bash echo "begin" timeout 60s minicom Cisco -d Boston -C log.txt