On Wed, 8 Dec 2004 15:22:39 +0530, Chandrakant Reddy
<[EMAIL PROTECTED]> wrote:
> Hi
>
>    I want to replace all occurances of  'and' with '&' in all the given files

In-place with backup in filename.bk:
perl -pi'*.bk' -e 's/\band\b/&/g' filenames

>      Here the problem is the files are owned by different users with
> different permissions. But now all the files are owned by root and
> also many of the files  with changed permission. i don't want to
> change the original ownership and permission of the file.

Run your script as root?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to