fix uniq -c
fix uniq -c
Posted Feb 17, 2025 9:30 UTC (Mon) by stijn (subscriber, #570)In reply to: fix uniq -c by dskoll
Parent article: Rewriting essential Linux packages in Rust
> ... | uniq -c | sed -e 's/^ *//'
The thought had occurred to me. Implicit in my point here is that this is a fudge, easily fixed by adding a new option to uniq that does the right thing. Shell programming with unix pipes can be an elegant and very concise way to mutate data in a functional way. Having to include fudges like the above (at the expense of a process) grates and creates an impression of crummy (shell) programming that should be completely unnecessary.
