<---获取40天日期数组--->
for i in {0..40};do echo "$(date --date=‘‘${i}‘ days ago‘ "+%Y%m%d")" done
@@ 扩展用法:获取10-00
for i in {10..00};do echo ${i} done
@@ 扩展用法:获取10-00,中间隔1位
for i in {10..00..2};do echo ${i} done
时间: 2024-11-07 10:58:54
<---获取40天日期数组--->
for i in {0..40};do echo "$(date --date=‘‘${i}‘ days ago‘ "+%Y%m%d")" done
@@ 扩展用法:获取10-00
for i in {10..00};do echo ${i} done
@@ 扩展用法:获取10-00,中间隔1位
for i in {10..00..2};do echo ${i} done