#/bin/sh
#时间
year=`date --date= +%Y`
month=`date --date= +%m`
day=`date --date="1 day ago" +%d`
mysql=" /usr/local/mysql/bin/mysql -h127.0.0.1 -uroot -proot jp_union -e "
sql=" select count(*) from unionsite where year(createTime)='$year' and month(createTime)='$month' and day(createTime)='$day' "
result=$($mysql "$sql");
echo $mysql
echo $sql
echo $result
~