3 ms·
After read the article... all the reasoning... I think I could go with this for such reasons exposed: perl -ne 'last if $. > 500; /mail/ && print' access.l
by txutxu 3y ago
After read the article... all the reasoning... I think I could go with this for such reasons exposed:
perl -ne 'last if $. > 500; /mail/ && print' access.log
When you're done with the part after the &&, remove the 'last if $. > 500'
For me, the most useful use of (gnu) cat, is cat -A weird.file
It saves my day or solves weird issues (X-files) with files generated by (not so) junior sysadmins, copy/pastes, end of lines, invisible diffs, etc... many times each year.
- 0xbadcafebee 3y agoBut then it's not modular! I need this one-liner to be more complicated because I read a classic paper recently.