脚本代码如下:
#!/bin/bash
for ((i=1; i<=365; i++)) do mkdir /root/test/`date ‘+%Y%m%d’ -d ‘ +’$i’ day’` done