Mail Archives: djgpp/1998/09/02/13:45:35
From: | pjfarley AT banet DOT net (Peter J. Farley III)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | BUG REPORT: sed v3.02
|
Date: | Wed, 02 Sep 1998 17:47:04 GMT
|
Message-ID: | <35ed8493.1668599@news1.banet.net>
|
NNTP-Posting-Host: | 32.100.113.210
|
Organization: | IBM.NET
|
Lines: | 62
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I have found a small bug in sed v3.02. The following sed script works
with sed v1.18, but fails with v3.02. The purpose of the script is to
put a '-' in front of any makefile command line which starts with
'$(RMF)' and doesn't already have a '-' in front.
Script:
---------- tmp2.sed ---------------
s/^\([ ]\+\)\($(RMF)\)/\1-\2/
---------- tmp2.sed ---------------
^ <-- Note: There is a real tab character here!
Data file:
---------- tmpx ---------------
realclean: clean
$(RMF) .depend
$(RMF) TAGS
$(RMF) *~
distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/mcserv $(srcdir)/*.o
-$(RMF) $(srcdir)/core $(srcdir)/libvfs.a
---------- tmpx ---------------
Here are the results of executing sed v1.18 vs. sed v3.02:
Sed v1.18 execution:
bash.exe//h/mc-4.1.35$ sed --version
GNU sed version 1.18
bash.exe//h/mc-4.1.35$ sed -f tmp2.sed < tmpx
realclean: clean
-$(RMF) .depend
-$(RMF) TAGS
-$(RMF) *~
distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/mcserv $(srcdir)/*.o
-$(RMF) $(srcdir)/core $(srcdir)/libvfs.a
Sed v3.02 execution:
bash.exe//h/mc-4.1.35$ sed302 --version
GNU sed version 3.02
Copyright (C) 1998 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.
bash.exe//h/mc-4.1.35$ sed302 -f tmp2.sed < tmpx
realclean: clean
$(RMF) .depend
$(RMF) TAGS
$(RMF) *~
distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/mcserv $(srcdir)/*.o
-$(RMF) $(srcdir)/core $(srcdir)/libvfs.a
----------------------------------------------------
Peter J. Farley III (pjfarley AT nospam DOT dorsai DOT org OR
pjfarley AT nospam DOT banet DOT net)
- Raw text -