converting .php files to .dhtml

Shane Lahey s.lahey at nl.rogers.com
Tue Jul 19 17:14:39 UTC 2005


Hello Ankush,

Tuesday, July 19, 2005, 9:48:00 AM, you wrote:

AG> hey friends,

AG> I want to know how to change all the file types of .php into .dhtml of
AG> a directory.There are few subdirectory under the main directory and
AG> each directory contains many .php files.

AG> I want to convert all the .php files under the main directory and
AG> under its subdirectories to .dhtml.

AG> Thanks & Regards
AG> Ankush Grover


create a shell script named php2dhtml.sh in your homedir with the following contents:
#!/bin/sh
[ -f "${1}" ] && mv "${1}" "${1/.php/.dhtml}"


then do something like:
find /path/to/phpfiles/ -name "*.php" -exec ~/php2dhtml.sh {} \;

-- 
Best regards,
 Shane

Shane Lahey <s.lahey at nl.rogers.com>
Homepage: http://craz1.homelinux.com
WebAlbum: http://webalbum.webhop.net




More information about the fedora-list mailing list