bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in Win32 port of sed


From: Martin Schulze
Subject: Bug in Win32 port of sed
Date: Sat, 03 Nov 2007 16:33:21 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0

Hello,

after wasting a couple of hours trying to fix my so supposed bug in the cmd file that I wrote, I just figured out that it more likely is a bug in the GNU Win32 port of of newer versions. At least I'd call it strange behaviour. This is present in the following implementations:

- Karl Syring's sed v3.02 from http://unxutils.sourceforge.net/
- Erics Pement's super-sed v3.59 from
  http://www.student.northpark.edu/pemente/sed/index.htm
- Other GNU-based implementations like that in MSYS (MinGW)

The bug can be easily verified:

1. Use or create a text file and make sure it has at least one or more double quotation marks (") in the text body (not in the file name).

2. Execute the following command from within cmd.exe shell to filter the quotation marks:

sed s!\"!!g file

where file is the name of the test file you used.

This will give the expected output on the screen. But as soon as you try to redirect or pipe the output, you will get errors:

sed s!\"!!g file >anyfile

The above command fails:

sed: can't read >anyfile: Invalid argument

BTW, there is a GNU sed v3.02.80 alpha release floating around that does NOT have this bug. This one is explicitely claimed to be buggy on Eric's site but at least it's working fine for me at least in this case. I downloaded the precompiled DOS version by Eli Zaretskii from Eric's mirror site:
http://www.student.northpark.edu/pemente/sed/sed3028a.zip

The test case with redirect executes just fine without any errors with this alpha version.

Regards,

Martin Schulze
Germaniastr. 243
45355 Essen, Germany




reply via email to

[Prev in Thread] Current Thread [Next in Thread]