4 ms·
It's "usless use of cat". He/she should have gone: `grep arathorn users.txt | head -1` Instead of: `cat users.txt | grep arathorn | head -n1` Hackers these
by xyproto 8y ago
It's "usless use of cat". He/she should have gone:
`grep arathorn users.txt | head -1`
Instead of:
`cat users.txt | grep arathorn | head -n1`
Hackers these days.
- draw_down 8y agoThat is fine.
- 0FDAA764 8y agoIt's a "useless use of head". He/she should have gone: `grep -m1 arathorn users` Instead of: `grep arathorn users.txt | head -1` Commenters these days.
- kqr 8y agoI still dont get that logic. What if it turns out i want to stick a prerprocessing step before grep? With a "useless" use of cat, thats easy. Without it, i need to do some rearranging. Not convinced.
- xyproto 8y agoIt's the YAGNI principle.