2011 AT2.1 update
[contractdashboard.git] / admin / data / rename.sh
1
2
3
4
5
6
7
8
9
#!/bin/bash
 
for file in ./*.xls
do
        echo "${file}"
        newfile=`sed -n "4p" "${file}" | sed -e "s/\t/^/g" | cut -d"^" -f 4 | cut -d" " -f 1 | sed -e "s/-//g"`
        mv "${file}" "${newfile}.xls"
done