#!/bin/shstart="20170831"end="20180208"while[[${start}-le${end}]];doecho${start}sql="ALTER TABLE dwh.dm_install_list_v2 DROP IF EXISTS PARTITION (dt='${start}',business='adserver')"echo"${sql}"if[[$?-ne 0 ]];thenexit 255fistart=`date-d"1 day ${start}" +%Y%m%d`# 日期自增done