What scripts do you regularly use to improve performance?
Over the past year, I have been trying to use bash scripts and commands to improve productivity as a developer (Web and application). Here is a list of a few simple ones that I use:
Make the files lowercase:
for i in *.txt; do mv "$i" "`echo $i| tr [A-Z] [a-z]`"; done
Check if the tag exists in subversion:
if [ "`svn ls http://www.mysvnserver.co.uk/myproject/tags | grep it-0.7.0.1/`" = "it-0.7.0.1/" ]; then echo YES; else echo NO; fi
Rename all the jpg files in the current directory and add the increment:
j=16;for i in *.jpg; do mv "$i" "gallery_"$j".jpg"; j=$(($j+1)); done;ls
Repair spelling error in the file name group:
for i in aples*.jpg; do mv $i ${i/aples/apples} ; done
See here for more details:
http://blog.emson.co.uk/2009/06/18-useful-bash-scripts-for-web-developers
What scripts do you use? Thanks...
emson
source
share