一个bash小脚本

1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
i=0
while [ $i -ne 60 ]
do
        cmd="date -d +${i}month +%Y%m"
        echo $cmd
        date=`$cmd`
        i=$(( $i + 1 ))
        `mkdir ${date}`
        echo $date
done
This entry was posted in Linux, shell. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *