本文共 450 字,大约阅读时间需要 1 分钟。
以下脚本放在周日用cron来执行,如果星期的数是偶数的话,就提醒把垃圾箱清理一下。
#!/bin/bash # Calculate the week number using the date command: weekdate=$[ $(date +"%V") % 2 ] # Test if we have a remainder. If not, this is an even week so send a message. # Else, do nothing. if [ $weekdate -eq "0" ]; then echo "Sunday evening, put out the garbage cans." | mail -s "laji qing li" 本文转自 zhangzj1030 51CTO博客,原文链接:http://blog.51cto.com/tech110/233914 转载地址:http://ianwl.baihongyu.com/