-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mário Gamito wrote: > My question is how do i change all ocorrences of the string ".html" to > ".php" inside all the files to change the links for all pages in a snap ? Awww, use Perl to change the links, but use PHP for server-side scripting, huh? :(
Try $ perl -pi.orig -e '[EMAIL PROTECTED]@[EMAIL PROTECTED]' *.php This will replace .html with .php in all .php files, creating backups of the old files at file.php.orig. You can couple this with a find command to traverse several levels of directories, etc. Hope this helps, Ricky -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGF/+AiXbZ7NjlUcARAp4FAKDbRLnlN5VUM5F92R0jEfwSSWofZACeK6wd Q7A4YiTUrmQewNj4tZwVd/Y= =rUBo -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/