Sed.exe temporary file bug
The utility 'sed.exe' (from GnuWin32) helped me in modifying a file during a headless installation process (changing a property in a "web.config" file). Until there, it was fairly cool.
But here comes the less fun part, I noticed that the executable creates a temporary file right in the middle of its working directory. This is a bug listed and commented here:
From what it looks like, the tool may have regressed in Windows 7 again. Unless it's because of the 64 bit system and the WoW emulation...? Anyway.
The temporary file is not that random, first we know where it is located, second, its name is made of 3 known characters 'sed' and 6 random alphanumeric ones. In regular expressions it would be something like
So let's rock'n'roll with a workaround. Let's call:
$> DEL /q sed??????
After further investigations, "sed????" works fine. So what is wrong?
"?????????" <=> "*"
The explanation I found is that DEL works still on the 8.3 character file name model.
So finally the only workaround is to wrap sed.exe into a batch file: