| 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 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: perl -i is very dangerous ! |
| References: | <3CD2B64F DOT 5090005 AT wanadoo DOT fr> |
| <120108386090 DOT 20020503201623 AT nyckelpiga DOT de> | |
| Organization: | Private |
| From: | pjacklam AT online DOT no (Peter J. Acklam) |
| Date: | 06 May 2002 22:34:05 +0200 |
| In-Reply-To: | <120108386090.20020503201623@nyckelpiga.de> |
| Message-ID: | <n0vd583m.fsf@online.no> |
| Lines: | 24 |
| User-Agent: | Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
| MIME-Version: | 1.0 |
"Gerrit P. Haase" <freeweb AT nyckelpiga DOT de> wrote: > Marc schrieb: > > > mc AT MILLENIUM:~/test/perldestroy# cat test.txt > > this is > > a test > > for cygwin > > mc AT MILLENIUM:~/test/perldestroy# perl -i -ne 's/this/works/' test.txt > > Can't do inplace edit on test.txt: Permission denied. > > mc AT 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |