Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Both the article's improved pipeline and Doug McIlroy's original have a bug. I've just written about it on +Ade Oshineye's post about the original article. https://plus.google.com/105037104815911535953/posts/KuXczyiw...


Good catch! I've implemented your suggested fix of adding a sed '/^$/d' at the beginning of McIlroy's pipeline. The github code is updated, along with an updated test file and expected output.

(Btw, the Python version did not have the bug, since the split method of Python strings already ignores initial whitespace.)


Your bug fix is broken; it makes no sense to place it there. I suggest increasing the number of test inputs to first show the problem.


Oops, you're right, the sed command should be on the second line. Fixed the test inputs and the fix.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: