首页 > Linux操作系统 > Linux操作系统 > 月末最后一天的判断shell脚本
#!/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
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16566331/viewspace-670112/ ,如需转载,请注明出处,否则将追究法律责任。