记录下shell的for的用法,及参数是日期的情况下,该日期+1day的用法:
#!/usr/bin/env bashsource /app/catt/login.shp_days="20171208 20171210 20171230 20180103 20180104 20180105 20180106 20180107 20180108 20180109 20180113 20180116 20180118 20180119 20180120 20180127"for p_day in $p_days;dop_hour_start=$p_day'00'p_nextday=`date -d "$p_day +1 day" +"%Y%m%d"`p_hour_end=$p_nextday'00'echo ${p_hour_start},${p_hour_end} end