Cameron Simpson wrote:
-
Yes and no. I have reasons to loathe and despise perl's -i mode
(it uses unlink/rename, which mangles ownership and perms).
So I use bsed:
http://www.zip.com.au/~cs/scripts/bsed
which is a wrapper for sed that does in-place edit, thus:
On 08:47 17 Dec 2002, Thierry ITTY <[EMAIL PROTECTED]> wrote:
| sed can't do edit-in-place, you'd better use perl with -i -p -e flags
|
| to change a file :
| perl -p -i -e 's//joe.somebody/' file
|
| to change a bunch of files :
| find /your/path -name 'pattern' -exec perl -p -i -e
| 's//joe.s
sed can't do edit-in-place, you'd better use perl with -i -p -e flags
to change a file :
perl -p -i -e 's//joe.somebody/' file
to change a bunch of files :
find /your/path -name 'pattern' -exec perl -p -i -e
's//joe.somebody/' {} \;
hth
A 23:04 16/12/2002 -0800, vous avez écrit :
>I have so
>I have some files that I want to replace with something like
>joe.somebody
>
>the files are in multiple locations:
>
>/location1/file1
>/location2/file2
>/location3/*.xml
>
>I have tried to figure out how to do this with sed but I'm not having any
>luck. Any sed people out there that can point m
I have some files that I want to replace with something like
joe.somebody
the files are in multiple locations:
/location1/file1
/location2/file2
/location3/*.xml
I have tried to figure out how to do this with sed but I'm not having any
luck. Any sed people out there that can point me to the co