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

cat /etc/passwd | head -n X | tail -n Y

Print lines X-Y to X of a file. :D

Why so complicated?

sed -ne 'X,Yp' /etc/passwd

Because that's what I came up with in first year uni and nobody ever said "hey, that's too complicated, you should learn to use sed properly."

I should learn to use sed properly.

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