Paul Eggert <[EMAIL PROTECTED]> wrote: > Dan Jacobson <[EMAIL PROTECTED]> writes: > >> $ echo a|sort -o x -o y >> $ ls >> y > > POSIX allows this behavior, but it's admittedly weird. > > I think that option order should not matter, unless POSIX or the > documentation explicitly says otherwise. So I propose the following > patch. While looking into this problem I noticed that sort's -t > option doesn't let you specify a NUL as a field separator (this is a > related issue since 'sort' uses 0 to represent "no option specified > yet"). Also, the documentation and usage strings incorrectly say > "white space" several places where they should say "blanks". Here's > a patch for these problems. > > 2003-09-02 Paul Eggert <[EMAIL PROTECTED]> > > * NEWS: sort -t '\0' now uses a NUL tab. > sort option order no longer matters, unless POSIX requires it. > * doc/coreutils.texi (sort invocation): -d now overrides -i. > "whitespace" -> "blanks"; "whitespace" isn't correct. > -t '\0' now specifies a NUL tab. > * src/sort.c (usage): Say "blanks" instead of "whitespace", > Similar fixes for many comments. > (TAB_DEFAULT): New constant, so that we can support NUL as > the field separator. > (tab): Now int, not char. Initialize to TAB_DEFAULT. > (specify_sort_size): If multiple sizes are specified, use the largest. > (begfield, limfield): Support NUL tab char. > (set_ordering): Do not let -i override -d. > (main): Report an error if incompatible -o or -t options are given. > Report an error for "-t ''". Allow "-t '\0'" to specify a NUL tab.
Thank you both! I've applied that patch and added a couple of tests. _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils
