|

楼主 |
发表于 2005-8-27 12:01:56
|
显示全部楼层
这是我写的,感谢大家的指点:
- #!/bin/sh
- d=$(date)
- FORMAL=`cat /root/date`
- if [ ${d:0:3} != $FORMAL ]
- then
- echo ${d:0:3} > /root/date
- if [ ${d:0:3} = "Fri" -o ${d:0:3} = "Sat" ]
- then
- at 23:50 -f /root/shutdownmessage
- shutdown -h 23:55
- else
- at 23:20 -f /root/shutdownmessage
- shutdown -h 23:25
- fi
- fi
复制代码
在/etc/rc.local调用,所需要的功能已经成功实现,现正在研究mantou的帖子。 |
|