* perl -i is very dangerous !
@ 2002-05-03 9:35 Marc Chantreux
0 siblings, 0 replies; 5+ messages in thread
From: Marc Chantreux @ 2002-05-03 9:35 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: perl -i is very dangerous ! --]
[-- Type: message/rfc822, Size: 728 bytes --]
From: Marc Chantreux <chantreux.marc@wanadoo.fr>
To: cygwin-help@cygwin.com
Subject: perl -i is very dangerous !
Date: Fri, 03 May 2002 18:09:51 +0200
Message-ID: <3CD2B64F.5090005@wanadoo.fr>
mc@MILLENIUM:~/test/perldestroy# cat test.txt
this is
a test
for cygwin
mc@MILLENIUM:~/test/perldestroy# perl -i -ne 's/this/works/' test.txt
Can't do inplace edit on test.txt: Permission denied.
mc@MILLENIUM:~/test/perldestroy# ls
any idea ?
Regards,
Marc
[-- Attachment #3: Type: text/plain, Size: 214 bytes --]
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: perl -i is very dangerous !
2002-05-03 11:17 ` Gerrit P. Haase
@ 2002-05-06 13:31 ` Peter J. Acklam
0 siblings, 0 replies; 5+ messages in thread
From: Peter J. Acklam @ 2002-05-06 13:31 UTC (permalink / raw)
To: cygwin
"Gerrit P. Haase" <freeweb@nyckelpiga.de> wrote:
> Marc schrieb:
>
> > mc@MILLENIUM:~/test/perldestroy# cat test.txt
> > this is
> > a test
> > for cygwin
> > mc@MILLENIUM:~/test/perldestroy# perl -i -ne 's/this/works/' test.txt
> > Can't do inplace edit on test.txt: Permission denied.
> > mc@MILLENIUM:~/test/perldestroy# ls
> > any idea ?
>
> It is gone.
>
> Use perl -i.bak instead.
Not to mention to use -p and *not* -n. The -n option will not
write back to the file, so it will end up having size zero.
Peter
--
Where do bit streams end? In bit rivers?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: perl -i is very dangerous !
2002-05-03 10:44 Robinow, David
@ 2002-05-03 11:21 ` Gerrit P. Haase
0 siblings, 0 replies; 5+ messages in thread
From: Gerrit P. Haase @ 2002-05-03 11:21 UTC (permalink / raw)
To: Robinow, David; +Cc: cygwin
David schrieb:
> I posted a (backward!) patch for this behavior on Aug 9, 2001
> http://sources.redhat.com/ml/cygwin/2001-08/msg00491.html
> I also sent it to the perl maintainers, although I may not
> sent it to the cygwin perl maintainer. Apparently it never
> made it into the released package.
I will include it in the next release which is perl-5.8 then.
Gerrit
--
=^..^=
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: perl -i is very dangerous !
[not found] <3CD2B64F.5090005@wanadoo.fr>
@ 2002-05-03 11:17 ` Gerrit P. Haase
2002-05-06 13:31 ` Peter J. Acklam
0 siblings, 1 reply; 5+ messages in thread
From: Gerrit P. Haase @ 2002-05-03 11:17 UTC (permalink / raw)
To: cygwin
Marc schrieb:
> mc@MILLENIUM:~/test/perldestroy# cat test.txt
> this is
> a test
> for cygwin
> mc@MILLENIUM:~/test/perldestroy# perl -i -ne 's/this/works/' test.txt
> Can't do inplace edit on test.txt: Permission denied.
> mc@MILLENIUM:~/test/perldestroy# ls
> any idea ?
It is gone.
Use perl -i.bak instead.
Gerrit
--
=^..^=
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: perl -i is very dangerous !
@ 2002-05-03 10:44 Robinow, David
2002-05-03 11:21 ` Gerrit P. Haase
0 siblings, 1 reply; 5+ messages in thread
From: Robinow, David @ 2002-05-03 10:44 UTC (permalink / raw)
To: 'Marc Chantreux', 'cygwin@cygwin.com'
> -----Original Message-----
> From: Marc Chantreux [mailto:chantreux.marc@wanadoo.fr]
> Sent: Friday, May 03, 2002 12:10 PM
> To: cygwin-help@cygwin.com
> Subject: perl -i is very dangerous !
>
>
> mc@MILLENIUM:~/test/perldestroy# cat test.txt
> this is
> a test
> for cygwin
> mc@MILLENIUM:~/test/perldestroy# perl -i -ne 's/this/works/' test.txt
> Can't do inplace edit on test.txt: Permission denied.
> mc@MILLENIUM:~/test/perldestroy# ls
I posted a (backward!) patch for this behavior on Aug 9, 2001
http://sources.redhat.com/ml/cygwin/2001-08/msg00491.html
I also sent it to the perl maintainers, although I may not
sent it to the cygwin perl maintainer. Apparently it never
made it into the released package.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-05-06 20:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-03 9:35 perl -i is very dangerous ! Marc Chantreux
2002-05-03 10:44 Robinow, David
2002-05-03 11:21 ` Gerrit P. Haase
[not found] <3CD2B64F.5090005@wanadoo.fr>
2002-05-03 11:17 ` Gerrit P. Haase
2002-05-06 13:31 ` Peter J. Acklam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).