fix uniq -c
fix uniq -c
Posted Feb 17, 2025 19:18 UTC (Mon) by mbunkus (subscriber, #87248)In reply to: fix uniq -c by stijn
Parent article: Rewriting essential Linux packages in Rust
> It is quite puzzling that Richard Stallman let this program loose on the world as it violates usual Unix well-behavedness of textual interfaces.
And to that my argument was that first and foremost `uniq -c` was most likely designed to be easy to read by humans. By that metric it is very much well-behaved & doesn't violate anything. Furthermore, even with it being designed to be human-readable its output is actually useable as-is by a lot of other traditional Unix programs, making it arguably even less of a "wrong" that has to be "righted" (your choice of words, again from your first post). Apart from awk & bash which I mentioned earlier, "sort -n" works fine as well.
