News for hackers. Stuff that matters.
Re:The Unix Game by 613style on Friday May 28, 2021 @11:39PM (#27322852)
I think there's two parts to this: first, if you know your input meets certain constraints, then there's no benefit to over-complicating the solution. Second, this is a teaching tool. It makes sense to start simply and save the harder version for later.
Re:The Unix Game by cbsmith on Saturday May 29, 2021 @02:05AM (#27323372)
Is it really so awful to do "grep -o '\b\w+%'"? It still won't handle extra space padding at the end of the line, but it's still a lot less ugly than assuming the word after the first space is a last name.
Re:The Unix Game by RasmusLarsen on Saturday May 29, 2021 @03:07AM (#27323567)
In the context of trying to teach people basics, yes, I would argue that is quite awful.
Re:The Unix Game by cbsmith on Saturday May 29, 2021 @05:46AM (#27324138)
Weird, not sure why it did % instead of $ there.