funme / coding

loving && coding && living
0 stars 0 forks source link

bash #35

Open funme opened 5 years ago

funme commented 5 years ago
initLogFolder.sh

#!/bin/bash

PARENT_PATH=./storage/logs/
rm -rf $PARENT_PATH*
for x in closeWeChatOrder orderAutomaticBalance orderConfirmReceipt rechargeOrder statisticsProductData couponInvalidDelete orderAutomaticFinish productStatusUpdate statisticsMallDailyData statisticsShopDailyData works orderAutomaticSmokeCommission product_status_update statisticsMallData statisticsShopData
do
    mkdir $PARENT_PATH$x
done

chmod -R 777 ./storage
funme commented 5 years ago

获取格式化日期

YESTERDAY=$(date -d "yesterday" +%Y-%m-%d)