Re: converting from php3 to php4

From: Joel Burton <jburton(at)scw(dot)org>
To: roy cabaniss <rcabaniss(at)austin(dot)rr(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: converting from php3 to php4
Date: 2001-04-08 09:26:33
Message-ID: Pine.LNX.4.21.0104080524310.19671-100000@olympus.scw.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 4 Apr 2001, roy cabaniss wrote:

> I am in the process of converting from php3 to php4 and at the same time
> going from mysql to postgres.
>
> All the relevent files reside in
>
> ../foo/bar
>
> And the vast majority are in the form *.php3 with internal references to
> other webpages which (of course) are also in the form *.php3.
>
> What I need is something that can go into that particular sub directory and
> find every instance of php3 and make it php, both as a part of a file name
> and internally in the file.

Not really a PostgreSQL problem, but something quick in Perl could do
this:

<untested>

perl -pi.bak -e 's/php4/php/gi;' `find -name "*.php3"`

</untested>

will iterate over all files in the current directory and below named
*.php3. It iterates over every line in the file, subbing php for php3.

Followups to a Perl list, please.

--
Joel Burton <jburton(at)scw(dot)org>
Director of Information Systems, Support Center of Washington

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joel Burton 2001-04-08 09:30:03 Re: speed on Postgresql compared to Mysql
Previous Message Louis-David Mitterrand 2001-04-08 09:10:06 Re: [GENERAL] Re: Permissons on database