Menu

#228 GNU sed version 4.1.2 - Windows in-place replace problem.

Sed
closed
GnuWin
Developer (39)
5
2012-09-18
2005-04-13
kmlee
No

Hi guys

Please keep up the great work with all this Open Source
stuff. We appreciate it.

But bugs keep on coming up!
I'm running windoze 98/xp and there's a problem with
the in-place replace function, with no backup file
specified.

With a backup suffix supplied, it's OK.
I intend to run sed on about 10,000 files. Having a
backup is not practical!

The following are the test cases with two files f1 and f2.

With all files in the same directory, I run sed and I
get the following messages.

sed.exe -i "s/456/555/g" *.txt
SED.EXE: cannot rename ./sedDOSSUX: File exists

The files are not protected in any way. Their contents are:

f1.txt:
123 456 789

f2.txt:
987 456 123

I have contacted Paolo Bonzini who suggests I post this
here.
Regards,

Discussion

  • GnuWin

    GnuWin - 2005-04-24

    Logged In: YES
    user_id=217802

    This bug has been fixed. A new release is available through
    http://gnuwin32.sourceforge.net/

     
  • Anonymous

    Anonymous - 2012-09-18

    Not sure where to post it, but there is a bug in the in-place editing. With a zero lenght character for backup extension especified (it was supposed not to make a backup), when its used as sed -i"" it generates backup, used as sed -i "" it says it cant find the desired file. used as -i '' it wont work. Windows version, backups are like "sedVVf5d1" - no extensions =/ 60.000 files having backup its not pratical. Deleting them on windows can take a LONG time.