Renaming file extensions with bash script
A couple of weeks ago I had to rename the file extension of several view scripts from html (from my own mvc framework) to phtml (zend framework). I found, as always, bash to be my friend.
for i in * do ( file $i | grep html ) && mv $i $(echo $i | sed s/html$/phtml/) doneby Claus Witt
April 30, 2009
Tags: bash, renaming file, script, short tips, zend Posted in: Development

One Response
The force of shellscripting is strong in this one..
Learn advanced scripting you must, zsh use you will