bash

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)

interlunation August 22 2011, 10:39:09 UTC
И это далеко не самый пиздец. Новая работа такая работа.

Reply


Leave a comment

Up