4 ms·
Can be done with one line of cat and grep. So why did you bother to reinvent the wheel in a python script?
by slig 17y ago
Can be done with one line of cat and grep. So why did you bother to reinvent the wheel in a python script?
- apgwoz 17y agoWhy yes, you happen to be correct. It can be done with cat and grep, and really you can do it without cat! However, it's perhaps desirable to be able to do things like edit the todo/tofix, delete them, export them to your todo application of choice, etc, etc, etc, etc. So, while you're correct in that you certainly can do it with grep, you're severely limiting yourself if you choose to.
- slig 17y agoI didn't read this when I posted, sorry. > Ideally it'd be able to remove them as I fixed things. So I might say tofix fixed 3 and it'd remove the "TOFIX: ..." at line 3.
- spectre 17y agocat <file> | grep "TOFIX\|TODO"