似乎用C的方法更简洁
<code>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main( int argc, char **argv )
{
while(1)
{
system("ok");
sleep(540);
}
return 0;
}
</code>
编译之后: 把程序放在后台运行就ok
------------------ 原始邮件 ------------------
发件人: "张睿";
发送时间: 2012年10月18日(星期四) 晚上9:35
收件人: "cquptlinux2012";
主题: [2012重邮Linux协会] 我的第一个脚本,用于Linux下外网拨号
该脚本将检测系统是否有建立拨号连接,如果没有则将运行ok。
--
您收到此邮件是因为您订阅了 Google 网上论坛的“2012重邮Linux协会”论坛。
通过以下网址访问此论坛:
http://groups.google.com/group/cquptlinux2012?hl=zh-CN。