Ugly stuff


-------------------------------

#!/bin/bash

for i in `find . -path './[0-9]*/[0-9]*' -type d -prune -exec dirname {} \;` ; do

    FOLDER=`basename $i`

    cd $i \

    && find . -path './[A-Za-z]*' -type d -prune -exec rm -r {} \; \

    && cd - \

    && mv -f $i/${FOLDER}/* $i/

done

Something are slow, ugly … but work ;) Last week I messed something up while automatically copying stuff around and well, the solution is really just ugly ;)

comments powered by Disqus