月末最后1天的判断脚本Shell
[
|
2007/06/27 08:54]
|
2007/06/27 08:54]
配合邮件的命令,发送报告。
思想:判断月末最后1天,也须是28,29,30,31号;但是月末最后1天的下1天肯定是1号。
适用于:bsh,bash,ksh,Perl
操作系统:Unix平台 linux
#!/bin/bash
#file=
if [ `TZ=PST-24 date +%d` = '01' ];then
echo "fuck the world"
fi
#$file
更为简单的linux平台下应用。
if [`date -d tomorrow +%d` = '01'];then
echo "this is cool"
fi
if [`date -d "+1day" +%d` = '01'];then
echo "day of the month"
fi
本文链接:http://www.52zhe.cn/read.php/48.htm
本文作者:kook(若就博客内所涉及的技术问题交流,请用下面的MSN或Gmail联系我)
联系方式:(MSN:kook#live.com) (Google talk:kookliu)
没有版权:GNU,转载时请注明“转载人”欠本人一顿饭,来日见面之时兑现!谢谢合作!
引用
思想:判断月末最后1天,也须是28,29,30,31号;但是月末最后1天的下1天肯定是1号。
适用于:bsh,bash,ksh,Perl
操作系统:Unix平台 linux
#!/bin/bash
#file=
if [ `TZ=PST-24 date +%d` = '01' ];then
echo "fuck the world"
fi
#$file
更为简单的linux平台下应用。
if [`date -d tomorrow +%d` = '01'];then
echo "this is cool"
fi
if [`date -d "+1day" +%d` = '01'];then
echo "day of the month"
fi
本文链接:http://www.52zhe.cn/read.php/48.htm
本文作者:kook(若就博客内所涉及的技术问题交流,请用下面的MSN或Gmail联系我)
联系方式:(MSN:kook#live.com) (Google talk:kookliu)
没有版权:GNU,转载时请注明“转载人”欠本人一顿饭,来日见面之时兑现!谢谢合作!
Aix 5.3 安装 weblogic 9.2中文版
ecshop迁移



