path of extchg.sh
[phpmyadmin/crack.git] / extchg.sh
blob169bb494b8b20329e1b99aaf34179cf773b17d36
1 #!/bin/sh
3 # $Id$
5 # original php3->phtml converter by Pavel Piankov <pashah@spb.sitek.net>
6 # modified by Tobias Ratschiller to allow any file extension
7 # part of the phpMyAdmin distribution <http://phpwizard.net/phpMyAdmin>
9 # 2001-07-07, lem9@users.sourceforge.net:
10 # - supports sub-directories
11 # - no more bak directory
13 if [ $# != 2 ]
14 then
15 echo "Usage: extchg.sh <extension to change from> <extension to change to>"
16 echo ""
17 echo "Example: extchg.sh php3 php"
18 exit
21 for i in `find . -name "*.$1"`
22 do
23 echo $i
24 sed -e 's/\.'$1'/\.'$2'/g' $i > `ls $i|sed -e 's/'$1'/'$2'/g'`
25 rm $i
26 done;