Remove subversion stuff from the sources

You may need to remove subversion stuff from some sources to add them onto another repository. Following bash command can do it assuming you’re in the root directory of the sources: for FILE in `find | grep “.svn”`; do if [ -d $FILE ]; then echo “file: $FILE”; rm -rf $FILE; fi; done

Read Me 4 Comments

How to rename files with bash

Recently I uploaded a few photos to the my site and I did a mistake in the name: Kirenia intead of Kyrenia. There were ten files but I didn’t want to change their names one by one. Thanks to bash. It offers an easy and elegant way to fix this problem: for FILE in `find|grep Kirenia`; do TARGET=$(echo $FILE | sed -e “s/Ki/Ky/”); mv $FILE […]

Read Me 2 Comments