| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <3E2E65BB.5060401@scytek.de> |
| Date: | Wed, 22 Jan 2003 10:34:51 +0100 |
| From: | Volker Quetschke <quetschke AT scytek DOT de> |
| User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 |
| X-Accept-Language: | en-us, en, de-de |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Perl with -i option removes files |
| X-Enigmail-Version: | 0.63.3.0 |
| X-Enigmail-Supports: | pgp-inline, pgp-mime |
| Note-from-DJ: | This may be spam |
--------------enig806DAF3957BC81C9DCD57F2B
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi!
Following szenario:
$ echo abc > testfile
$ perl -p -i -e 's/b/x/g' testfile
Can't do inplace edit on testfile: Permission denied.
$ ls -l testfile
ls: testfile: No such file or directory
If I use:
$ perl -p -i".bak" -e 's/l/x/g' testfile
I get an unchanged testfile.bak plus a changed testfile.
Is this a bug or feature?
$ cygcheck -c cygwin perl
Cygwin Package Information
Package Version
cygwin 1.3.17-1
perl 5.6.1-2
on Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 3.
I also tested this sequence on:
[q AT unics]~:{349}:$ uname -a
SunOS unics 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-Enterprise
[q AT unics]~:{351}:$ perl -v
This is perl, version 5.005_03 built for sun4-solaris
where it doesn't remove the file.
Bye
Volker
--
PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net
key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D
--------------enig806DAF3957BC81C9DCD57F2B
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org
iD8DBQE+LmW+PTXJup+KeF0RApqxAJ9uTanoo4jfvK3Zanzf/BzzZmFOPgCghZPf
sIQ1YDIG1lz+5mjYkS9ka5M=
=xY+7
-----END PGP SIGNATURE-----
--------------enig806DAF3957BC81C9DCD57F2B--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |