| 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: | <05ed01c2d4e7$d551ffd0$ab7886d9@webdev> |
| Reply-To: | "Elfyn McBratney" <cygwin AT cygwin DOT com> |
| From: | "Elfyn McBratney" <elfyn-cygwin AT exposure DOT org DOT uk> |
| To: | "cygwin" <cygwin AT cygwin DOT com>, "Kei Tsuji" <e091 AT dr DOT com> |
| References: | <20030215 DOT 203238 DOT 01365686 DOT kei AT comrade DOT co DOT jp> |
| Subject: | Re: sed problem |
| Date: | Sat, 15 Feb 2003 11:46:09 -0000 |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2800.1106 |
> I'm using sed on cygwin.
>
> I have a problem with -i option.
>
> ----- ----- ----- ----- -----
> kei AT cygwin% cat test
> apple
> kei AT cygwin% ls
> test
> kei AT cygwin% cat test
> apple
> kei AT cygwin% sed -i "s/apple/orange/g" test
> kei AT cygwin% cat test
> apple
> kei AT cygwin% ls
> sed003980
> test
> kei AT cygwin% cat sed003980
> orange
> kei AT cygwin% ???
> ----- ----- ----- ----- -----
>
> I have no idea of what's happening.
> The version before this newest version seemed to work fine, but I
> forgot that version number...
>
> Does anybody have the same problem with me?
> And how can I fix this problem?
> Thank you in advance.
>
> [...]
> kei AT cygwin% sed -V
> GNU sed version 4.0.1
> ----- ----- ----- ----- -----
Nope. The only difference in software is that I'm using version 4.0.5 .
Perhaps an upgrade would fix your problem. I haven't got the source for sed,
but it might be that it doesn't have write permission to file `test' to it
outputs to sed[pid] instead (silently?). Does the file `test' have write
permissions?
Here's what I tried
[elfyn AT webdev]:{708}:% echo apple >test
[elfyn AT webdev]:{709}:% cat test
apple
[elfyn AT webdev]:{710}:% ls test
test
[elfyn AT webdev]:{711}:% ls -al test
-rw-r--r-- 1 elfyn root 6 Feb 15 11:43 test
[elfyn AT webdev]:{712}:% cat test
apple
[elfyn AT webdev]:{713}:% sed -i 's/apple/orange/' test
[elfyn AT webdev]:{714}:% cat test
orange
[elfyn AT webdev]:{715}:%
All working, as it should :-)
Regards,
Elfyn McBratney
elfyn AT exposure DOT org DOT uk
www.exposure.org.uk
--
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 |