Hacker News new | ask | show | jobs
by taneq 3588 days ago
cat /etc/passwd | head -n X | tail -n Y

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

1 comments

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.