Hacker News new | past | comments | ask | show | jobs | submit login

For last line, I always did

   tac [file] | head -n 1
Mainly because I can never remember basic sed commands

(Strange, OS X doesn't seem to have tac, but Cygwin does...)




The BSDish way of pronouncing 'tac' is 'tail -r'.


If you installed coreutils with homebrew, it's called gtac.


Why not just tail -n [file]?




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: