This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: sed problem
- 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>
- Date: Sat, 15 Feb 2003 11:46:09 -0000
- Subject: Re: sed problem
- References: <20030215.203238.01365686.kei@comrade.co.jp>
- Reply-to: "Elfyn McBratney" <cygwin at cygwin dot com>
> I'm using sed on cygwin.
>
> I have a problem with -i option.
>
> ----- ----- ----- ----- -----
> kei@cygwin% cat test
> apple
> kei@cygwin% ls
> test
> kei@cygwin% cat test
> apple
> kei@cygwin% sed -i "s/apple/orange/g" test
> kei@cygwin% cat test
> apple
> kei@cygwin% ls
> sed003980
> test
> kei@cygwin% cat sed003980
> orange
> kei@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@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@webdev]:{708}:% echo apple >test
[elfyn@webdev]:{709}:% cat test
apple
[elfyn@webdev]:{710}:% ls test
test
[elfyn@webdev]:{711}:% ls -al test
-rw-r--r-- 1 elfyn root 6 Feb 15 11:43 test
[elfyn@webdev]:{712}:% cat test
apple
[elfyn@webdev]:{713}:% sed -i 's/apple/orange/' test
[elfyn@webdev]:{714}:% cat test
orange
[elfyn@webdev]:{715}:%
All working, as it should :-)
Regards,
Elfyn McBratney
elfyn@exposure.org.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/