Aug 22, 2011 09:48
for i in `ls . | grep XSMS`; do echo $i;day=`echo $i | awk '{print substr($0,4,3)}'`;dir=`date -d "2011-01-01 +$(( ${day} - 1 ))days" +%j_%Y%m%d`;echo $dir;[ ! -d ./tmp/$dir ] && mkdir -p ./tmp/$dir/; cp $i ./tmp/$dir;done
Leave a comment
Comments 1
(The comment has been removed)
Reply
Leave a comment