演示
yum -y install expect
[root@sky ~]# cat sleep_test.exp set timeout 5 spawn tailf gg.sql expect eof [root@sky ~]# expect sleep_test.exp