#!/bin/bash
yesterday=`date -d 'yesterday' +%Y-%m-%d`
# 生成日期
for day in {11..15}
do
the_day=2019-05-$day
echo ${the_day}
mv day=${the_day} ${the_day}
echo "文件名修改完毕!"
done
dataPath="/data/path/"
echo ${dataPath}
for day in {1..7}
do
theDay=`date -d "$day day ago" +%Y-%m-%d`
echo ${theDay}
mv day=${theDay} ${theDay}
done
echo "over!"
网友评论