News for hackers. Stuff that matters.
Re:More shell, less egg (2011) by im3w1l on Sunday June 04, 2023 @09:54PM (#36191387)
I think it will be faster than python or perl, because the actual work is done by optimized c-code.

However if you want to extend the program from a toy to something that can handle words like "won't" "c-code" "a.i." or "naïve" then it will be quite difficult to do so.

Re:More shell, less egg (2011) by tyingq on Sunday June 04, 2023 @10:00PM (#36191415)
I tried a perl script versus the shell pipeline, see my other comments in the thread. It's significantly faster, because using sort and uniq -c is a pretty high effort way to count words, especially for big lists. Your words seem to work fine with it, it's just splitting on whitespace.