This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sed -i problem?


I seem to be having problem with the -i flag in sed 4.0.1 in the
latest cygwin release.  The docs state -i places output in a tmp file
and renames the tmp to the original when finished.  It appears the
rename is not happening for me:

22 OSAKA:$ mkdir /c/temp/sed
23 OSAKA:$ cd cd /c/temp/sed
25 OSAKA:sed$ echo "hi" > hi
26 OSAKA:sed$ sed -i 's/hi/there/' hi
27 OSAKA:sed$ ls
hi  sed000188
28 OSAKA:sed$ cat hi
hi
30 OSAKA:sed$ cat sed000188
there
31 OSAKA:sed$ sed 's/hi/there/' -i hi
32 OSAKA:sed$ ls
hi  sed000188  sed003016
33 OSAKA:sed$ cat sed003016
there
34 OSAKA:sed$ sed --version
GNU sed version 4.0.1
Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.


Or am I misunderstanding the proper use of the option?  A quick google
search for "gnu sed 4.0.1 -i" revealed no obvious references.  The
news file from 4.0.5 (the most recent on ftp.gnu.org) doesn't mention
the problem or a fix either.

Thanks,
-- 
Robert Mecklenburg


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]