trying to build dash: awk and sort bugs uncovered
Denis Vlasenko
vda.linux at googlemail.com
Tue Jan 2 08:03:04 PST 2007
On Tuesday 02 January 2007 05:03, Rob Landley wrote:
> > I tried to build dash (Debian ash) and found the following.
>
> While trying to build what actual packages? (What actually _broke_?)
dash is an ash ported to Debian. I tried to compile it
on a system where /bin/sort and /bin/awk are symlinks
to busybox.
> > sort -u -k 3.3: incorrect workings of -u[nigue] option:
>
> 3,3 is a standard, 3.3 is a gnu extension. That said I'm under the vague
> impression I implemented it at some point.
IIRC manpage says -k N[.Nflags][,N[.Nflags]] and bbox indeed supports
almost all of this.
> However, what you gave isn't a
> test I can reproduce.
Sorry. See attached test script. For it was showing the following:
--- 1 Tue Jan 2 16:54:50 2007
+++ 2 Tue Jan 2 16:54:50 2007
@@ -1,7 +1,9 @@
10 echo echocmd
6 cd cdcmd
+ 7 chdir cdcmd
4 bg bgcmd
3 alias aliascmd
8 command commandcmd
1 . dotcmd
5 break breakcmd
+ 9 continue breakcmd
In other words, our sort -u did not discard lines if _key_
(not entire line) is the same, while coreutils did.
I will describe awk bug if you really want to know.
Or else yust look at current awk.c - it has a comment on that
in awk_main().
I already fixed sort -u and awk bugs.
You won't see awk bug anyway because you are most probably
in POSIX locale.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sort_u_bug
Type: application/x-shellscript
Size: 402 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20070102/d8492662/attachment.bin
More information about the busybox
mailing list