Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
b5n
on Feb 21, 2024
|
parent
|
context
|
favorite
| on:
Useful Uses of cat
I usually do it all in awk:
awk '/mail/ && NR <= 500 {...}' access.log
If you want N matched lines:
awk '/mail/ && i < 500 {i++; ...}' access.log
matvore
on Feb 21, 2024
[–]
I wish I knew awk as well as I know perl, since then I wouldn't need to hear recommendations for CPAN modules and spurious style prescriptions.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: