Hacker News new | ask | show | jobs
by mudetroit 3585 days ago
or just more /etc/passwd | less ¯\_(ツ)_/¯
1 comments

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.